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

Thomas Diesler (JIRA) issues at jboss.org
Tue Feb 10 07:53:49 EST 2015


     [ https://issues.jboss.org/browse/ARQ-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler resolved ARQ-1879.
---------------------------------
    Resolution: Out of Date


Out of Date

> 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.11#6341)


More information about the arquillian-issues mailing list