db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r387351 - /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/result/VariableInResult.java
Date Mon, 20 Mar 2006 23:56:26 GMT
Author: clr
Date: Mon Mar 20 15:56:24 2006
New Revision: 387351

URL: http://svn.apache.org/viewcvs?rev=387351&view=rev
Log:
JDO-310 Work around Derby bug

Modified:
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/result/VariableInResult.java

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/result/VariableInResult.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/result/VariableInResult.java?rev=387351&r1=387350&r2=387351&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/result/VariableInResult.java (original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/result/VariableInResult.java Mon
Mar 20 15:56:24 2006
@@ -20,6 +20,7 @@
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
+import org.apache.jdo.tck.pc.company.Department;
 import org.apache.jdo.tck.pc.company.Employee;
 import org.apache.jdo.tck.query.QueryElementHolder;
 import org.apache.jdo.tck.query.QueryTest;
@@ -52,26 +53,12 @@
     private static final QueryElementHolder[] VALID_QUERIES = {
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "distinct p",
+        /*RESULT*/      "distinct e",
         /*INTO*/        null, 
-        /*FROM*/        Employee.class,
+        /*FROM*/        Department.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(p) & p.name == 'orange'",
-        /*VARIABLES*/   "Project p",
-        /*PARAMETERS*/  null,
-        /*IMPORTS*/     null,
-        /*GROUP BY*/    null,
-        /*ORDER BY*/    null,
-        /*FROM*/        null,
-        /*TO*/          null),
-        new QueryElementHolder(
-        /*UNIQUE*/      null,
-        /*RESULT*/      "p",
-        /*INTO*/        null, 
-        /*FROM*/        Employee.class,
-        /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(p) & p.name == 'orange'",
-        /*VARIABLES*/   "Project p",
+        /*WHERE*/       "employees.contains(e)",
+        /*VARIABLES*/   "Employee e",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -113,8 +100,8 @@
      */
     private Object[] expectedResult = {
         // this
-        getTransientCompanyModelInstancesAsList(new String[]{"proj1"}),
-        getTransientCompanyModelInstancesAsList(new String[]{"proj1","proj1","proj1"}),
+        getTransientCompanyModelInstancesAsList(
+                new String[]{"emp1","emp2","emp3","emp4","emp5"}),
         // Note: "orange" is not a bean name!
         Arrays.asList(new Object[]{new Object[]{new Long(1), "orange"}}),
         Arrays.asList(new Object[]{
@@ -142,17 +129,8 @@
     }
 
     /** */
-    public void testNoNavigation() {
-        int index = 1;
-        executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[index], 
-                expectedResult[index]);
-        executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[index], 
-                expectedResult[index]);
-    }
-
-    /** */
     public void testDistinctNavigation() {
-        int index = 2;
+        int index = 1;
         executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[index], 
                 expectedResult[index]);
         executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[index], 
@@ -161,7 +139,7 @@
 
     /** */
     public void testNavigation() {
-        int index = 3;
+        int index = 2;
         executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[index], 
                 expectedResult[index]);
         executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[index], 



Mime
View raw message