db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r423366 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
Date Wed, 19 Jul 2006 04:47:50 GMT
Author: tomdz
Date: Tue Jul 18 21:47:49 2006
New Revision: 423366

URL: http://svn.apache.org/viewvc?rev=423366&view=rev
Log:
Workaround for a strange behavior of the DB2 database

Modified:
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java?rev=423366&r1=423365&r2=423366&view=diff
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java Tue Jul 18 21:47:49
2006
@@ -111,8 +111,14 @@
         assertEquals(getAdjustedModel(),
                      readModelFromDatabase("roundtriptest"));
 
-        List beans = getRows("roundtrip");
+        List     beans = getRows("roundtrip");
+        DynaBean bean  = (DynaBean)beans.get(0); 
 
+        // Some databases (e.g. DB2) pad the string for some reason, so we manually trim
it
+        if (bean.get("avalue") instanceof String)
+        {
+            bean.set("avalue", ((String)bean.get("avalue")).trim());
+        }
         assertEquals((Object)"2", beans.get(0), "avalue");
     }
 



Mime
View raw message