[arquillian-issues] [JBoss JIRA] (ARQ-1879) Remove dependency on TCCL in JUnitBundleTestRunner

Thomas Diesler (JIRA) issues at jboss.org
Wed Nov 5 04:31:35 EST 2014


Thomas Diesler created ARQ-1879:
-----------------------------------

             Summary: Remove dependency on TCCL in JUnitBundleTestRunner
                 Key: ARQ-1879
                 URL: https://issues.jboss.org/browse/ARQ-1879
             Project: Arquillian
          Issue Type: Bug
          Components: OSGi Containers
            Reporter: Thomas Diesler
            Assignee: Thomas Diesler


Currently the JUnitBundleTestRunner uses code like this

{code}
    public TestResult execute(Class<?> testClass, String methodName) {
        ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
        try {
            // Make sure we run in the context of the arquillian-bundle class loader
            Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
            return super.execute(testClass, methodName);
        } finally {
            Thread.currentThread().setContextClassLoader(ctxLoader);
        }
    }
{code}

This causes issues with APIs that use the TCCL for resource discovery. Investigate why the TCCL is used at all and whether the testClass CL could be used instead



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the arquillian-issues mailing list