db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Jefferson (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JDO-580) Add TCK query test using methods in the query result
Date Mon, 14 Jun 2010 08:15:15 GMT

     [ https://issues.apache.org/jira/browse/JDO-580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andy Jefferson updated JDO-580:
-------------------------------

    Fix Version/s: JDO 3 maintenance release 1

Likely could go in JDO 3.1 since the RI has a rewritten JDOQL implementation.

    [java] 1) testCollectionSizeInResult(org.apache.jdo.tck.query.result.MethodsInResult)junit.framework.AssertionFailedError:
Assertion (MethodsInResult) failed:                                                      
                                                             
    [java] Wrong query result:                                                           
                                                 
    [java] query: SELECT this.employees.size() FROM org.apache.jdo.tck.pc.company.Department
ORDER BY this.name ascending                  
    [java] expected: java.util.ArrayList of size 2                                       
                                                 
    [java] [3, 2]                                                                        
                                                 
    [java] got:      java.util.ArrayList of size 2                                       
                                                 
    [java] [3, 2]

Why is this test expecting Long results ? the return from java.util.Collection.size() is "int".


    [java] 2) testMapSizeInResult(org.apache.jdo.tck.query.result.MethodsInResult)junit.framework.AssertionFailedError:
Assertion (MethodsInResult) failed:                                                      
                                                                    
    [java] Wrong query result:                                                           
                                                 
    [java] query: SELECT this.phoneNumbers.size() FROM org.apache.jdo.tck.pc.company.Employee
ORDER BY this.lastname ascending, this.firstname ascending                               
                                                                                         
    
    [java] expected: java.util.ArrayList of size 5                                       
                                                 
    [java] [2, 2, 2, 2, 2]                                                               
                                                 
    [java] got:      java.util.ArrayList of size 5                                       
                                                 
    [java] [2, 2, 2, 2, 2]

Why is this test expecting Long results ? the return from java.util.Map.size() is "int".


    [java] 3) testMaxAndSizeInResult(org.apache.jdo.tck.query.result.MethodsInResult)junit.framework.AssertionFailedError:
Assertion (MethodsInResult) failed:
    [java] Wrong query result:
    [java] query: SELECT MAX(this.employees.size()) FROM org.apache.jdo.tck.pc.company.Department
    [java] expected: java.lang.Long of size 1
    [java] 3
    [java] got:      java.lang.Integer of size 1
    [java] 3

Same here

All other tests pass for DataNucleus SVN trunk.

> Add TCK query test using methods in the query result
> ----------------------------------------------------
>
>                 Key: JDO-580
>                 URL: https://issues.apache.org/jira/browse/JDO-580
>             Project: JDO
>          Issue Type: Test
>          Components: specification, tck, tck2-legacy
>    Affects Versions: JDO 2 maintenance release 1
>            Reporter: Michael Bouschen
>            Assignee: Craig L Russell
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: derby-app-JDO-580-junit.txt, JDO-580.conf, JDO-580.patch
>
>
> There are currently no TCK tests for using size() and max() or other aggregates in queries.
For example, find the Node or Nodes with the maximum number of children: SELECT FROM Node
WHERE this.children.size() == (SELECT MAX(n.children.size()) FROM Node n).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message