db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r500944 - in /db/ddlutils/trunk/src/test/org/apache/ddlutils: io/TestAlteration.java platform/TestMySql50Platform.java platform/TestMySqlPlatform.java
Date Mon, 29 Jan 2007 05:50:57 GMT
Author: tomdz
Date: Sun Jan 28 21:50:57 2007
New Revision: 500944

URL: http://svn.apache.org/viewvc?view=rev&rev=500944
Log:
Fixed tests

Modified:
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySql50Platform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySqlPlatform.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?view=diff&rev=500944&r1=500943&r2=500944
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestAlteration.java Sun Jan 28 21:50:57
2007
@@ -170,9 +170,15 @@
         assertEquals(getAdjustedModel(),
                      readModelFromDatabase("roundtriptest"));
 
-        List beans = getRows("roundtrip2");
+        List     beans = getRows("roundtrip2");
+        DynaBean bean  = (DynaBean)beans.get(0);
 
-        assertEquals((Object)"1", beans.get(0), "fk");
+        // Some databases (e.g. DB2) pad the string for some reason, so we manually trim
it
+        if (bean.get("fk") instanceof String)
+        {
+            bean.set("fk", ((String)bean.get("fk")).trim());
+        }
+        assertEquals((Object)"1", bean, "fk");
     }
 
     /**

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySql50Platform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySql50Platform.java?view=diff&rev=500944&r1=500943&r2=500944
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySql50Platform.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySql50Platform.java Sun Jan
28 21:50:57 2007
@@ -115,9 +115,7 @@
     {
         assertEqualsIgnoringWhitespaces(
             "ALTER TABLE `table3` DROP FOREIGN KEY `testfk`;\n"+
-            "ALTER TABLE `table3` DROP INDEX `testfk`;\n"+
             "ALTER TABLE `table2` DROP FOREIGN KEY `table2_FK_COL_FK_1_COL_FK_2_table1`;\n"+
-            "ALTER TABLE `table2` DROP INDEX `table2_FK_COL_FK_1_COL_FK_2_table1`;\n"+
             "DROP TABLE IF EXISTS `table3`;\n"+
             "DROP TABLE IF EXISTS `table2`;\n"+
             "DROP TABLE IF EXISTS `table1`;\n"+

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySqlPlatform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySqlPlatform.java?view=diff&rev=500944&r1=500943&r2=500944
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySqlPlatform.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/platform/TestMySqlPlatform.java Sun Jan
28 21:50:57 2007
@@ -127,9 +127,7 @@
     {
         assertEqualsIgnoringWhitespaces(
             "ALTER TABLE `table3` DROP FOREIGN KEY `testfk`;\n"+
-            "ALTER TABLE `table3` DROP INDEX `testfk`;\n"+
             "ALTER TABLE `table2` DROP FOREIGN KEY `table2_FK_COL_FK_1_COL_FK_2_table1`;\n"+
-            "ALTER TABLE `table2` DROP INDEX `table2_FK_COL_FK_1_COL_FK_2_table1`;\n"+
             "DROP TABLE IF EXISTS `table3`;\n"+
             "DROP TABLE IF EXISTS `table2`;\n"+
             "DROP TABLE IF EXISTS `table1`;\n"+



Mime
View raw message