openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1135273 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java
Date Mon, 13 Jun 2011 20:50:24 GMT
Author: mikedd
Date: Mon Jun 13 20:50:24 2011
New Revision: 1135273

URL: http://svn.apache.org/viewvc?rev=1135273&view=rev
Log:
Add order by clause for TestOrderColumn which was failing on Sybase. Also cleaned up asserts
and removed DROP_TABLES

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java?rev=1135273&r1=1135272&r2=1135273&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java
Mon Jun 13 20:50:24 2011
@@ -44,7 +44,8 @@ public class TestOrderColumn extends Sin
     private Student[] students = new Student[12];
     
     public void setUp() {
-        super.setUp(DROP_TABLES,
+        super.setUp(
+//            DROP_TABLES,
                 Person.class, Player.class, BattingOrder.class,
                 Trainer.class, Game.class, Inning.class,
                 Course.class, Student.class,
@@ -865,14 +866,14 @@ public class TestOrderColumn extends Sin
 
         // Query and verify the result
         String queryString = "SELECT INDEX(w) FROM Course c JOIN c.waitList w" +
-            " WHERE c.name = :cname";
+            " WHERE c.name = :cname ORDER BY w";
         Query qry = em.createQuery(queryString);
         qry.setParameter("cname", "Course A");
         List rlist = qry.getResultList();       
         assertNotNull(rlist);
-        assertEquals(rlist.size(), 2);
-        assertEquals(rlist.get(0), 0L);
-        assertEquals(rlist.get(1), 1L);
+        assertEquals(2, rlist.size());
+        assertEquals(0l, rlist.get(0));
+        assertEquals(1l, rlist.get(1));
 
         queryString = "SELECT INDEX(w) FROM Course c JOIN c.waitList w" +
             " WHERE c.name = :cname AND w.name = 'Student11'";



Mime
View raw message