db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michelle Caisse (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JDO-432) Test for behaviour of null passed to detachCopy(), makePersistent(), etc
Date Mon, 16 Oct 2006 19:34:35 GMT
     [ http://issues.apache.org/jira/browse/JDO-432?page=all ]

Michelle Caisse updated JDO-432:
--------------------------------

    Attachment: jdo-432-2.patch

This patch is complete for this issue.  It contains a new superclass and a test class for
each PersistanceManager API family under test, in a new package.  I updated pm.conf to invoke
these tests.  Please review.

There are three failures in the 50 new test cases:

    [java] 1) testDetachCopyCollectionNullElement(org.apache.jdo.tck.api.persistencemanager.nullargs.DetachCopyNullArgs)junit.framework.AssertionFailedError:
Assertion A12.6-5 failed:
    [java] detachCopyAll(Collection) on a null Collection element should do nothing. Instead
we get: org.jpox.exceptions.ClassNotDetachableException: The class "org.apache.jdo.tck.pc.mylib.PCPoint"
is
 not Detachable. This means that the MetaData for the class did not have the "detachable"
attribute set to true.
    [java]      at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:638)
...
    [java] 2) testDetachCopyArrayNullElement(org.apache.jdo.tck.api.persistencemanager.nullargs.DetachCopyNullArgs)junit.framework.AssertionFailedError:
Assertion A12.6-5 failed:
    [java] detachCopyAll(Array) on a null array element should do nothing. Instead we get:
org.jpox.exceptions.ClassNotDetachableException: The class "org.apache.jdo.tck.pc.mylib.PCPoint"
is not Detac
hable. This means that the MetaData for the class did not have the "detachable" attribute
set to true.
...
    [java] 3) testMakeNontransactionalNullObject(org.apache.jdo.tck.api.persistencemanager.nullargs.MakeNontransactionalNullArgs)junit.framework.AssertionFailedError:
Assertion A12.6-3 failed:
    [java] makeNontransactional(null)on a null object should do nothing. Instead we get: java.lang.NullPointerException
    [java]      at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:638)
    [java]      at org.apache.jdo.tck.api.persistencemanager.nullargs.PersistenceManagerNullsTest.executeNullObjectParameter(PersistenceManagerNullsTest.java:222)
    [java]      at org.apache.jdo.tck.api.persistencemanager.nullargs.MakeNontransactionalNullArgs.testMakeNontransactionalNullObject(MakeNontransactionalNullArgs.java:69)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:253)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)


> Test for behaviour of null passed to detachCopy(), makePersistent(), etc
> ------------------------------------------------------------------------
>
>                 Key: JDO-432
>                 URL: http://issues.apache.org/jira/browse/JDO-432
>             Project: JDO
>          Issue Type: Task
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Andy Jefferson
>         Assigned To: Michelle Caisse
>            Priority: Minor
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-432-2.patch, jdo-432.patch
>
>
> The JDO2 spec adequately defines (section 12.6.0 "Null Management")  behaviour when null
values are passed in to the PersistenceManager methods makePersistent, detachCopy, etc but
there doesnt seem to be a test for these situations currently. JPOX 1.1.2 on calling detachCopy(null)
actually throws an NPE, which is outside of spec ... now fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message