OPENJPA-1862 Enable test to run correctly on DB2

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1030495 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dianne E. Richards 2010-11-03 15:19:29 +00:00
parent a70b134576
commit c6d23cdb08

View File

@ -85,6 +85,7 @@ public class TestSpec10_1_27 extends SQLListenerTestCase {
setCandidate(q, Compny1.class); setCandidate(q, Compny1.class);
List<?> rs = q.getResultList(); List<?> rs = q.getResultList();
Division d = (Division) rs.get(0); Division d = (Division) rs.get(0);
Division d2 = (Division) rs.get(1);
em.clear(); em.clear();
query = "select ENTRY(e) from Compny1 c, " + query = "select ENTRY(e) from Compny1 c, " +
@ -95,8 +96,8 @@ public class TestSpec10_1_27 extends SQLListenerTestCase {
rs = q.getResultList(); rs = q.getResultList();
Map.Entry me = (Map.Entry) rs.get(0); 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, " + query = "select KEY(e) from Compny2 c, " +
" in (c.orgs) e order by c.id"; " in (c.orgs) e order by c.id";
q = em.createQuery(query); q = em.createQuery(query);
@ -104,6 +105,7 @@ public class TestSpec10_1_27 extends SQLListenerTestCase {
setCandidate(q, Compny2.class); setCandidate(q, Compny2.class);
rs = q.getResultList(); rs = q.getResultList();
d = (Division) rs.get(0); d = (Division) rs.get(0);
d2 = (Division) rs.get(1);
em.clear(); em.clear();
query = "select ENTRY(e) from Compny2 c, " + query = "select ENTRY(e) from Compny2 c, " +
@ -114,7 +116,7 @@ public class TestSpec10_1_27 extends SQLListenerTestCase {
rs = q.getResultList(); rs = q.getResultList();
me = (Map.Entry) rs.get(0); me = (Map.Entry) rs.get(0);
assertEquals(d, me.getKey()); assertTrue(d.equals(me.getKey()) || d2.equals(me.getKey()));
// new tests for element collection // new tests for element collection
em.clear(); em.clear();