Class SeparateClassloaderTestRunner

  • All Implemented Interfaces:
    org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

    public class SeparateClassloaderTestRunner
    extends org.junit.runners.BlockJUnit4ClassRunner
    This class is used when it's required to load jgit classes in separate classloader for each test class. It can be needed to isolate static field initialization between separate tests.
    Since:
    5.5
    • Method Summary

      • Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner

        collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
      • Methods inherited from class org.junit.runners.ParentRunner

        childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
      • Methods inherited from class org.junit.runner.Runner

        testCount
    • Constructor Detail

      • SeparateClassloaderTestRunner

        public SeparateClassloaderTestRunner​(Class<?> klass)
                                      throws org.junit.runners.model.InitializationError
        Creates a SeparateClassloaderTestRunner to run klass.
        Parameters:
        klass - test class to run.
        Throws:
        org.junit.runners.model.InitializationError - if the test class is malformed or can't be found.