Class JUnitClassloaderRunner

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
se.jiderhamn.classloader.leak.JUnitClassloaderRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

public class JUnitClassloaderRunner extends org.junit.runners.BlockJUnit4ClassRunner
Author:
Mattias Jiderhamn
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Make sure Garbage Collection has been run
    static void
    forceGc(int n)
    Make sure Garbage Collection has been run N no of times
    protected org.junit.runners.model.Statement
    methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)
     

    Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner

    collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JUnitClassloaderRunner

      public JUnitClassloaderRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
      Throws:
      org.junit.runners.model.InitializationError
  • Method Details

    • methodInvoker

      protected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)
      Overrides:
      methodInvoker in class org.junit.runners.BlockJUnit4ClassRunner
    • forceGc

      public static void forceGc(int n)
      Make sure Garbage Collection has been run N no of times
    • forceGc

      public static void forceGc()
      Make sure Garbage Collection has been run