Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1879

Remove dependency on TCCL in JUnitBundleTestRunner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • OSGi Containers
    • None

      Currently the JUnitBundleTestRunner uses code like this

          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);
              }
          }
      

      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

            tdiesler@redhat.com Thomas Diesler
            tdiesler@redhat.com Thomas Diesler
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: