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

Michael Bouschen updated JDO-768:
---------------------------------
    Attachment: JDO-768-patch.txt

It truns out the test PMFMapMapTest is causing the problem. A number of test 
methods set the context class loader to a specific resouce class loader without 
resetting the context class loader at the end of the test. So this context 
class loader is able to find the specified resource, where the default context 
class loader does not. The attached path JDO-768-patch.txt changes class 
PMFMapMapTest to reset the context class loader.

> Failure in api test case testGetPMFNullResource(javax.jdo.JDOHelperTest) 
> -------------------------------------------------------------------------
>
>                 Key: JDO-768
>                 URL: https://issues.apache.org/jira/browse/JDO-768
>             Project: JDO
>          Issue Type: Bug
>          Components: api
>    Affects Versions: JDO 3.1
>            Reporter: Michael Bouschen
>            Assignee: Michael Bouschen
>            Priority: Critical
>             Fix For: JDO 3.2
>
>         Attachments: JDO-768-patch.txt
>
>
> Test method testGetPMFNullResource of API test class JDOHelperTest fails when 
> running 'mvn clean verify' in the submodule api:
> {noformat}
> testGetPMFNullResource(javax.jdo.JDOHelperTest)  Time elapsed: 0.003 sec  <<< 
> FAILURE!
> junit.framework.AssertionFailedError: Null resource name should result in 
> JDOFatalUserException
>       at junit.framework.Assert.fail(Assert.java:47)
>       at 
> javax.jdo.JDOHelperTest.testGetPMFNullResource(JDOHelperTest.java:196)
> {noformat}
> Please note, the test case succeeds when running it alone:
> {noformat}
> mvn -Dtest=javax.jdo.JDOHelperTest clean verify
> {noformat}
> It fails if the test case PMFMapMapTest is executed before JDOHelperTest:
> {noformat}
> mvn -Dtest=javax.jdo.PMFMapMapTest,javax.jdo.JDOHelperTest clean verify
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to