Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-645

Query test case SingleStringQuery fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JDO 3 (3.0)
    • JDO 3 (3.0)
    • tck
    • None

    Description

      The query test case org.apache.jdo.tck.query.api.SingleStringQuery (Method testPositive) fails after switching to the latest datanucleus version 2.0.0-m3-SNAPSHOT. Th equery returns an Array, where it expects to get back a FullName instance:

      testPositive(org.apache.jdo.tck.query.api.SingleStringQuery)junit.framework.AssertionFailedError: Assertion A14.6-23 SingleStringQuery) failed:
      Wrong query result:
      query: SELECT UNIQUE firstname, lastname INTO FullName FROM FullTimeEmployee WHERE salary > 1000 & projects.contains(p) & p.budget > limit & firstname == 'emp1First' VARIABLES Project p PARAMETERS BigDecimal limit import org.apache.jdo.tck.query.result.classes.FullName; import org.apache.jdo.tck.pc.company.FullTimeEmployee; import org.apache.jdo.tck.pc.company.Project; import java.math.BigDecimal; GROUP BY firstname, lastname ORDER BY lastname ASCENDING RANGE 0,5
      expected: org.apache.jdo.tck.query.result.classes.FullName of size 1
      emp1First emp1Last
      got: java.util.Arrays$ArrayList of size 2
      [emp1First, emp1Last]
      at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:682)
      at org.apache.jdo.tck.query.QueryTest.queryFailed(QueryTest.java:518)
      at org.apache.jdo.tck.query.QueryTest.checkQueryResultWithOrder(QueryTest.java:533)
      at org.apache.jdo.tck.query.QueryTest.execute(QueryTest.java:1290)
      at org.apache.jdo.tck.query.QueryTest.executeJDOQuery(QueryTest.java:1161)
      at org.apache.jdo.tck.query.api.SingleStringQuery.testPositive(SingleStringQuery.java:96)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:272)
      at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)

      Attachments

        Activity

          People

            andyj Andy Jefferson
            mbo Michael Bouschen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: