openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dian...@apache.org
Subject svn commit: r1030495 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_27_ex0/TestSpec10_1_27.java
Date Wed, 03 Nov 2010 15:19:29 GMT
Author: dianner
Date: Wed Nov  3 15:19:29 2010
New Revision: 1030495

URL: http://svn.apache.org/viewvc?rev=1030495&view=rev
Log:
OPENJPA-1862 Enable test to run correctly on DB2

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_27_ex0/TestSpec10_1_27.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_27_ex0/TestSpec10_1_27.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_27_ex0/TestSpec10_1_27.java?rev=1030495&r1=1030494&r2=1030495&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_27_ex0/TestSpec10_1_27.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/spec_10_1_27_ex0/TestSpec10_1_27.java
Wed Nov  3 15:19:29 2010
@@ -85,6 +85,7 @@ public class TestSpec10_1_27 extends SQL
             setCandidate(q, Compny1.class);
         List<?> rs = q.getResultList();
         Division d = (Division) rs.get(0);
+        Division d2 = (Division) rs.get(1);
 
         em.clear();
         query = "select ENTRY(e) from Compny1 c, " +
@@ -95,8 +96,8 @@ public class TestSpec10_1_27 extends SQL
         rs = q.getResultList();
         Map.Entry me = (Map.Entry) rs.get(0);
 
-        assertEquals(d, me.getKey());
-
+        assertTrue(d.equals(me.getKey()) || d2.equals(me.getKey()));
+        
         query = "select KEY(e) from Compny2 c, " +
             " in (c.orgs) e order by c.id";
         q = em.createQuery(query);
@@ -104,6 +105,7 @@ public class TestSpec10_1_27 extends SQL
             setCandidate(q, Compny2.class);
         rs = q.getResultList();
         d = (Division) rs.get(0);
+        d2 = (Division) rs.get(1);
 
         em.clear();
         query = "select ENTRY(e) from Compny2 c, " +
@@ -114,7 +116,7 @@ public class TestSpec10_1_27 extends SQL
         rs = q.getResultList();
         me = (Map.Entry) rs.get(0);
 
-        assertEquals(d, me.getKey());
+        assertTrue(d.equals(me.getKey()) || d2.equals(me.getKey()));
         
         // new tests for element collection
         em.clear();



Mime
View raw message