db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1231677 - in /db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque: ForeignKeySchemaData.java generated/peer/FillerTest.java
Date Sun, 15 Jan 2012 14:46:17 GMT
Author: tfischer
Date: Sun Jan 15 14:46:16 2012
New Revision: 1231677

URL: http://svn.apache.org/viewvc?rev=1231677&view=rev
Log:
Further try to find issue with failing tests on jenkins

Modified:
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java?rev=1231677&r1=1231676&r2=1231677&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java
Sun Jan 15 14:46:16 2012
@@ -607,4 +607,111 @@ public class ForeignKeySchemaData
         criteria = new Criteria();
         CompIntegerVarcharPkPeer.doDelete(criteria);
     }
+
+    /**
+     * Prints all records in the foreign-key-schema's tables to stdout.
+     *
+     * @throws TorqueException if the tables could not be cleaned
+     */
+    public static void dumpDatabase() throws TorqueException
+    {
+        {
+            System.out.println("contents of table "
+                    + NullablePIntegerFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<NullablePIntegerFk> tableContent
+                = NullablePIntegerFkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + RequiredPIntegerFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<RequiredPIntegerFk> tableContent
+                = RequiredPIntegerFkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + NonPkPIntegerFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<NonPkPIntegerFk> tableContent
+                = NonPkPIntegerFkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + NullablePIntegerFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<NullablePIntegerFk> tableContent
+                = NullablePIntegerFkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + RequiredOIntegerFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<RequiredOIntegerFk> tableContent
+                = RequiredOIntegerFkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + NonPkOIntegerFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<NonPkOIntegerFk> tableContent
+                = NonPkOIntegerFkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + PIntegerPkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<PIntegerPk> tableContent
+                = PIntegerPkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + OIntegerPkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<OIntegerPk> tableContent
+                = OIntegerPkPeer.doSelect(criteria);
+            System.out.println(tableContent);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + CompIntegerVarcharFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<CompIntegerVarcharFk> nullablePIntegerFks
+                = CompIntegerVarcharFkPeer.doSelect(criteria);
+            System.out.println(nullablePIntegerFks);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + CompNonpkFkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<CompNonpkFk> nullablePIntegerFks
+                = CompNonpkFkPeer.doSelect(criteria);
+            System.out.println(nullablePIntegerFks);
+        }
+
+        {
+            System.out.println("contents of table "
+                    + CompIntegerVarcharPkPeer.TABLE_NAME);
+            Criteria criteria = new Criteria();
+            List<CompIntegerVarcharPk> nullablePIntegerFks
+                = CompIntegerVarcharPkPeer.doSelect(criteria);
+            System.out.println(nullablePIntegerFks);
+        }
+    }
 }

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java?rev=1231677&r1=1231676&r2=1231677&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java
(original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java
Sun Jan 15 14:46:16 2012
@@ -301,8 +301,8 @@ public class FillerTest extends BaseRunt
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
-        Criteria criteria = new Criteria();
-        criteria.add(NullableOIntegerFkPeer.NAME, "nullableOIntegerFk3a");
+        Criteria criteria = new Criteria().where(
+                NullableOIntegerFkPeer.NAME, "nullableOIntegerFk3a");
 
         List<NullableOIntegerFk> fkList
                 = NullableOIntegerFkPeer.doSelect(criteria);
@@ -613,6 +613,7 @@ public class FillerTest extends BaseRunt
             {
                 fail("fk Object with id " + fkObject.getId()
                         + " on position " + count + " has foreign key 0");
+                ForeignKeySchemaData.dumpDatabase();
             }
             ++count;
         }
@@ -795,8 +796,8 @@ public class FillerTest extends BaseRunt
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
-        Criteria criteria = new Criteria();
-        criteria.add(OIntegerPkPeer.NAME, "oIntegerPk2");
+        Criteria criteria = new Criteria().where(
+                OIntegerPkPeer.NAME, "oIntegerPk2");
 
         List<OIntegerPk> pkList
                 = OIntegerPkPeer.doSelect(criteria);



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message