Testcases don't reset contextClassLoader back to defaults...
------------------------------------------------------------
Key: TUSCANY-121
URL: http://issues.apache.org/jira/browse/TUSCANY-121
Project: Tuscany
Type: Bug
Components: Java SCA JavaScript Container
Environment: Gentoo LInux, JDK 1.5.0_06
Reporter: Daniel Kulp
The Javascript test cases dont' save the original context classloader and then
restore it back during tearDown. (in one case, it resets the
contextClassLoader to null which is worse) Thus, depending on the order the
tests are run, failures may pop up. In my case, I'm seeing:
[surefire] Running
org.apache.tuscany.container.js.assembly.tests.JavaScriptAssemblyLoaderTestCase
[surefire] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.1 sec
[surefire]
[surefire] Running
org.apache.tuscany.container.js.assembly.impl.JavaScriptImplementationTestCase
[surefire] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.003 sec
[surefire]
[surefire] Running
org.apache.tuscany.container.js.integration.JSComponentContextTestCase
[surefire] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.078 sec
[surefire]
[surefire]
testBasicInvocation(org.apache.tuscany.container.js.integration.JSComponentContextTestCase)
Time elapsed: 0.074 sec <<< ERROR!
java.lang.ClassNotFoundException:
org/apache/tuscany/core/context/impl/AggregateContextImpl
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at
org.apache.tuscany.core.config.JavaIntrospectionHelper.loadClass(JavaIntrospectionHelper.java:305)
at
org.apache.tuscany.container.js.mock.MockAssemblyFactory.createSystemComponent(MockAssemblyFactory.java:71)
at
org.apache.tuscany.container.js.integration.JSComponentContextTestCase.testBasicInvocation(JSComponentContextTestCase.java:77)
..............
I have a patch which I'll be attaching to this bug.
--
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