HHH-8127 OutOfMemoryError when running tests
This commit is contained in:
parent
3343e6d6c3
commit
11464ea097
|
@ -100,7 +100,24 @@ public class CustomRunner extends BlockJUnit4ClassRunner {
|
|||
return isAllTestsIgnored;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void run(RunNotifier notifier) {
|
||||
super.run( notifier );
|
||||
|
||||
cleanup();
|
||||
}
|
||||
|
||||
private void cleanup() {
|
||||
if ( computedTestMethods != null && !computedTestMethods.isEmpty() ) {
|
||||
computedTestMethods.clear();
|
||||
computedTestMethods = null;
|
||||
}
|
||||
testInstance = null;
|
||||
testClassMetadata = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Statement withBeforeClasses(Statement statement) {
|
||||
if ( isAllTestsIgnored() ) {
|
||||
return super.withBeforeClasses( statement );
|
||||
|
|
Loading…
Reference in New Issue