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

Remove dependency on TCCL in JUnitBundleTestRunner

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: