[ 
https://issues.apache.org/jira/browse/JDO-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868969#action_12868969
 ] 

Michelle Caisse commented on JDO-653:
-------------------------------------

After applying the second patch, I get three test failures for each identity 
type:
Description: All pmf tests with standard mapping, no testdata.
Time: 026
There were 3 failures:
1) 
test(org.apache.jdo.tck.api.persistencemanagerfactory.AfterCloseSetMethodsThrowException)junit.framework.AssertionFailedError:
 Assertion A11.4-9A (AfterCloseSetMethodsThrowException) failed:
Caught unexpected exception org.datanucleus.exceptions.NucleusUserException: 
Invalid TimeZone ID specified from setServerTimeZoneID
        at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:682)
        at 
org.apache.jdo.tck.api.persistencemanagerfactory.AfterCloseSetMethodsThrowException.test(AfterCloseSetMethodsThrowException.java:148)
        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)
2) 
test(org.apache.jdo.tck.api.persistencemanagerfactory.Close)junit.framework.AssertionFailedError:
 Assertions A11.4-2 (Close), A11.4-10 (isClosed) failed:
Unexpected exception at repeated pmf.close(): javax.jdo.JDOUserException: Can't 
access or use persistence factory after it has been closed.
        at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:682)
        at 
org.apache.jdo.tck.api.persistencemanagerfactory.Close.test(Close.java:98)
        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)
3) 
test(org.apache.jdo.tck.api.persistencemanagerfactory.CloseWithoutPermissionThrowsSecurityException)junit.framework.AssertionFailedError:
 Assertions A11.4-3 (CloseWithoutPermissionThrowsSecurityException) failed:
Unexpected exception at pmf.close(): javax.jdo.JDOUserException: Can't access 
or use persistence factory after it has been closed.
        at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:682)
        at 
org.apache.jdo.tck.api.persistencemanagerfactory.CloseWithoutPermissionThrowsSecurityException.closeWithMySecurityManager(CloseWithoutPermissionThrowsSecurityException.java:89)
        at 
org.apache.jdo.tck.api.persistencemanagerfactory.CloseWithoutPermissionThrowsSecurityException.test(CloseWithoutPermissionThrowsSecurityException.java:67)
        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)
FAILURES!!!
derby-app-pmf-junit.txt:
    ** Tests run: 067, Time: 026 seconds. Failures: 3, Errors: 0


> Extra checks in PMF.close tests
> -------------------------------
>
>                 Key: JDO-653
>                 URL: https://issues.apache.org/jira/browse/JDO-653
>             Project: JDO
>          Issue Type: Test
>          Components: tck
>    Affects Versions: JDO 2 maintenance release 2
>            Reporter: Peter Dettman
>            Assignee: Michelle Caisse
>         Attachments: JDO-653-2nd.patch, JDO-653.patch
>
>
> Some of the implications of section 11.4 don't appear to be checked for in 
> the case of an already-closed PersistenceManagerFactory.
> 1. If close() is called on an already-closed PMF (with correct permission 
> i.e. "closePersistenceManagerFactory"), no exception should be thrown.
> 2. If close() is called on an already-closed PMF (without correct 
> permission), exception should be thrown (even though it would otherwise do 
> nothing).
> 3. If close() fails (throws JDOUserException) due to active transaction(s), 
> then none of the PersistenceManager objects belonging to the PMF should have 
> actually been closed.
> 4. Several get/set pairs are not tested for their behaviour after close()

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

Reply via email to