db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1846357 - in /db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query: jdoql/ jdoql/methods/ jdoql/operators/ result/
Date Sun, 11 Nov 2018 19:14:54 GMT
Author: mbo
Date: Sun Nov 11 19:14:54 2018
New Revision: 1846357

URL: http://svn.apache.org/viewvc?rev=1846357&view=rev
Log:
JDO-652: more test cases

Modified:
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/Cast.java
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedCollectionMethods.java
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedStringMethods.java
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/operators/Instanceof.java
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/AggregateResult.java
    db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/ResultExpressions.java

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/Cast.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/Cast.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/Cast.java (original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/Cast.java Sun Nov 11 19:14:54
2018
@@ -65,9 +65,10 @@ public class Cast extends QueryTest {
 
         JDOQLTypedQuery<Employee> query = getPM().newJDOQLTypedQuery(Employee.class);
         QEmployee cand = QEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.cast(FullTimeEmployee.class);
-        //query.filter(cast.salary.gt(15000.0));
+        // DataNucleus: java.lang.ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.cast(FullTimeEmployee.class);
+        query.filter(cast.salary.gt(15000.0));
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      null,
@@ -88,8 +89,7 @@ public class Cast extends QueryTest {
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
 
     /** */
@@ -99,9 +99,10 @@ public class Cast extends QueryTest {
         JDOQLTypedQuery<Department> query = getPM().newJDOQLTypedQuery(Department.class);
         QDepartment cand = QDepartment.candidate();
         QEmployee e = QEmployee.variable("e");
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.cast(FullTimeEmployee.class);
-        //query.filter(cand.employees.contains(e).and(cast.salary.gt(15000.0)));
+        // DataNucleus: java.lang.ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.cast(FullTimeEmployee.class);
+        query.filter(cand.employees.contains(e).and(cast.salary.gt(15000.0)));
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      null,
@@ -117,13 +118,12 @@ public class Cast extends QueryTest {
                 /*ORDER BY*/    null,
                 /*FROM*/        null,
                 /*TO*/          null,
-                /*JDOQLTyped*/  null,
+                /*JDOQLTyped*/  query,
                 /*paramValues*/ null);
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
     
     /**

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java
(original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java
Sun Nov 11 19:14:54 2018
@@ -187,8 +187,7 @@ public class NavigationComparisonWithNul
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: Dont currently support operator NOT
 in JDOQL conversion
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
 
     /**
@@ -326,8 +325,7 @@ public class NavigationComparisonWithNul
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: Dont currently support operator NOT
 in JDOQL conversion
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
 
     /**
@@ -464,8 +462,7 @@ public class NavigationComparisonWithNul
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: Dont currently support operator NOT
 in JDOQL conversion
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
     
     /**

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java
(original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java
Sun Nov 11 19:14:54 2018
@@ -193,8 +193,6 @@ public class NavigationThroughANullValue
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: NucleusUserException: Variable 'medicalInsurance' is unbound and
cannot be determined
-        // (is it a misspelled field name? or is not intended to be a variable?)
         executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
     

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedCollectionMethods.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedCollectionMethods.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedCollectionMethods.java
(original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedCollectionMethods.java
Sun Nov 11 19:14:54 2018
@@ -159,8 +159,7 @@ public class SupportedCollectionMethods
 
         executeAPIQuery(ASSERTION_FAILED, holder, expectedResult);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expectedResult);
-        // DataNucleus: exception UnsupportedOperationException: Dont currently support operator
NOT  in JDOQL conversion
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expectedResult);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expectedResult);
 
         // isEmpty
         expectedResult = getTransientCompanyModelInstancesAsList(new String[]{

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedStringMethods.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedStringMethods.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedStringMethods.java
(original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/methods/SupportedStringMethods.java
Sun Nov 11 19:14:54 2018
@@ -523,7 +523,6 @@ public class SupportedStringMethods exte
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: NullPointerException at org.datanucleus.store.rdbms.sql.method.StringTrim2Method.getExpression(StringTrim2Method.java:48)
         executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
 

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/operators/Instanceof.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/operators/Instanceof.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/operators/Instanceof.java
(original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/jdoql/operators/Instanceof.java
Sun Nov 11 19:14:54 2018
@@ -58,8 +58,7 @@ public class Instanceof extends QueryTes
 
         JDOQLTypedQuery<Employee> query = getPM().newJDOQLTypedQuery(Employee.class);
         QEmployee cand = QEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: instanceOf not yet supported
-        //query.filter(cand.mentor.instanceOf(PartTimeEmployee.class));
+        query.filter(cand.mentor.instanceOf(PartTimeEmployee.class));
 
         // Import Department twice
         QueryElementHolder holder = new QueryElementHolder(
@@ -81,8 +80,7 @@ public class Instanceof extends QueryTes
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: instanceOf not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
 
     public void testPositive2() {
@@ -90,8 +88,7 @@ public class Instanceof extends QueryTes
 
         JDOQLTypedQuery<Employee> query = getPM().newJDOQLTypedQuery(Employee.class);
         QEmployee cand = QEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: instanceOf not yet supported
-        //query.filter(cand.mentor.instanceOf(PartTimeEmployee.class));
+        query.filter(cand.mentor.instanceOf(PartTimeEmployee.class));
 
         // Import Department twice
         QueryElementHolder holder = new QueryElementHolder(
@@ -113,8 +110,7 @@ public class Instanceof extends QueryTes
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: instanceOf not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expected);
     }
     /**
      * @see JDO_Test#localSetUp()

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/AggregateResult.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/AggregateResult.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/AggregateResult.java (original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/AggregateResult.java Sun
Nov 11 19:14:54 2018
@@ -375,9 +375,10 @@ public class AggregateResult extends Que
 
         JDOQLTypedQuery<FullTimeEmployee> query = getPM().newJDOQLTypedQuery(FullTimeEmployee.class);
         QFullTimeEmployee cand = QFullTimeEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
-        //query.result(false, cast.salary.sum());
+        // DataNucleus: java.lang.ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
+        query.result(false, cast.salary.sum());
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      Boolean.TRUE,
@@ -398,8 +399,7 @@ public class AggregateResult extends Que
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
     }
 
     /** */
@@ -409,9 +409,10 @@ public class AggregateResult extends Que
 
         JDOQLTypedQuery<FullTimeEmployee> query = getPM().newJDOQLTypedQuery(FullTimeEmployee.class);
         QFullTimeEmployee cand = QFullTimeEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
-        //query.result(false, cast.salary.sumDistinct());
+        // DataNucleus: )java.lang.ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
+        query.result(false, cast.salary.sumDistinct());
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      Boolean.TRUE,
@@ -432,8 +433,7 @@ public class AggregateResult extends Que
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
     }
 
     /** */
@@ -568,9 +568,10 @@ public class AggregateResult extends Que
 
         JDOQLTypedQuery<FullTimeEmployee> query = getPM().newJDOQLTypedQuery(FullTimeEmployee.class);
         QFullTimeEmployee cand = QFullTimeEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
-        //query.result(false, cast.salary.min());
+        // DataNucleus: ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
+        query.result(false, cast.salary.min());
 
         QueryElementHolder holder =  new QueryElementHolder(
                 /*UNIQUE*/      Boolean.TRUE,
@@ -591,8 +592,7 @@ public class AggregateResult extends Que
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
     }
     /** */
     public void testMax0() {
@@ -720,15 +720,16 @@ public class AggregateResult extends Que
     }
 
     /** */
-    public void testMAX4() {
+    public void testMax4() {
         // MAX(((FullTimeEmployee)manager).salary)
         Object expected = new Double(10000);
 
         JDOQLTypedQuery<FullTimeEmployee> query = getPM().newJDOQLTypedQuery(FullTimeEmployee.class);
         QFullTimeEmployee cand = QFullTimeEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
-        //query.result(false, cast.salary.max());
+        // DataNucleus: java.lang.ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
+        query.result(false, cast.salary.max());
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      Boolean.TRUE,
@@ -749,12 +750,11 @@ public class AggregateResult extends Que
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
     }
 
     /** */
-    public void testAVG0() {
+    public void testAvg0() {
         // AVG(long)
         Object expected = new Double(3);
 
@@ -785,7 +785,7 @@ public class AggregateResult extends Que
     }
 
     /** */
-    public void testAVG1() {
+    public void testAvg1() {
         // AVG(double)
         Object expected = new Double(25000.0);
 
@@ -816,7 +816,7 @@ public class AggregateResult extends Que
     }
 
     /** */
-    public void testAVG2() {
+    public void testAvg2() {
         // AVG(BigDecimal)
         Object expected = new Double("99.997");
 
@@ -847,7 +847,7 @@ public class AggregateResult extends Que
     }
 
     /** */
-    public void testAVG3() {
+    public void testAvg3() {
         // AVG(lifetimeOrthoBenefit)
         Object expected = null;
 
@@ -879,15 +879,16 @@ public class AggregateResult extends Que
     }
 
     /** */
-    public void testAVG4() {
+    public void testAvg4() {
         // AVG(((FullTimeEmployee)manager).salary)
         Object expected = new Double(10000);
 
         JDOQLTypedQuery<FullTimeEmployee> query = getPM().newJDOQLTypedQuery(FullTimeEmployee.class);
         QFullTimeEmployee cand = QFullTimeEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
-        //query.result(false, cast.salary.avg());
+        // DataNucleus: java.lang.ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
+        query.result(false, cast.salary.avg());
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      Boolean.TRUE,
@@ -908,20 +909,20 @@ public class AggregateResult extends Que
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
     }
 
     /** */
-    public void testAVG5() {
+    public void testAvg5() {
         // AVG(DISTINCT ((FullTimeEmployee)manager).salary)
         Object expected = new Double(10000);
 
         JDOQLTypedQuery<FullTimeEmployee> query = getPM().newJDOQLTypedQuery(FullTimeEmployee.class);
         QFullTimeEmployee cand = QFullTimeEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
-        //query.result(false, cast.salary.avgDistinct());
+        // DataNucleus: java.lang.ClassCastException: org.datanucleus.api.jdo.query.PersistableExpressionImpl
+        // cannot be cast to org.apache.jdo.tck.pc.company.QFullTimeEmployee
+        QFullTimeEmployee cast = (QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
+        query.result(false, cast.salary.avgDistinct());
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      Boolean.TRUE,
@@ -942,8 +943,7 @@ public class AggregateResult extends Que
 
         executeAPIQuery(ASSERTION_FAILED, holder, expected);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expected);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expected);
     }
 
     public void testNegative() {

Modified: db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/ResultExpressions.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/ResultExpressions.java?rev=1846357&r1=1846356&r2=1846357&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/ResultExpressions.java
(original)
+++ db/jdo/trunk/tck/src/main/java/org/apache/jdo/tck/query/result/ResultExpressions.java
Sun Nov 11 19:14:54 2018
@@ -161,9 +161,6 @@ public class ResultExpressions extends Q
 
         executeAPIQuery(ASSERTION_FAILED, holder, expectedResult);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expectedResult);
-        // DataNucleus: org.datanucleus.exceptions.NucleusUserException: Query needs to return
objects of type
-        // "org.apache.jdo.tck.pc.company.Employee" but it was impossible to create a new
instance of this type.
-        // The result class needs a no-args constructor.
         executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expectedResult);
     }
 
@@ -546,7 +543,6 @@ public class ResultExpressions extends Q
 
         executeAPIQuery(ASSERTION_FAILED, holder, expectedResult);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expectedResult);
-        // DataNucleus: wrong result: [Development, Development, Development, Development]
         executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expectedResult);
     }
 
@@ -663,9 +659,8 @@ public class ResultExpressions extends Q
 
         JDOQLTypedQuery<Employee> query = getPM().newJDOQLTypedQuery(Employee.class);
         QEmployee cand = QEmployee.candidate();
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //query.result(false, cand.manager.cast(FullTimeEmployee.class));
-        //query.filter(cand.personid.eq(1l));
+        query.result(false, cand.manager.cast(FullTimeEmployee.class));
+        query.filter(cand.personid.eq(1l));
 
         QueryElementHolder holder = new QueryElementHolder(
                 /*UNIQUE*/      null,
@@ -686,8 +681,7 @@ public class ResultExpressions extends Q
 
         executeAPIQuery(ASSERTION_FAILED, holder, expectedResult);
         executeSingleStringQuery(ASSERTION_FAILED, holder, expectedResult);
-        // DataNucleus: UnsupportedOperationException: cast not yet supported
-        //executeJDOQLTypedQuery(ASSERTION_FAILED, holder, FullTimeEmployee.class, expectedResult);
+        executeJDOQLTypedQuery(ASSERTION_FAILED, holder, null, true, expectedResult);
     }
 
     /** */



Mime
View raw message