mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
clear fields after test run to avoid leaks when the test class instance stuck in queues
This commit is contained in:
@@ -140,6 +140,9 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
|
||||
protected void tearDown() throws Exception {
|
||||
ThreadTracker.awaitThreadTerminationWithParentParentGroup("JDI main", 100, TimeUnit.SECONDS);
|
||||
try {
|
||||
myDebugProcess = null;
|
||||
myPauseScriptListener = null;
|
||||
myRatherLaterRequests.clear();
|
||||
super.tearDown();
|
||||
}
|
||||
finally {
|
||||
@@ -150,6 +153,7 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
|
||||
protected void throwExceptionsIfAny() {
|
||||
synchronized (myException) {
|
||||
CompoundRuntimeException.throwIfNotEmpty(myException);
|
||||
myException.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,9 @@ public abstract class ExecutionTestCase extends IdeaTestCase {
|
||||
protected void tearDown() throws Exception {
|
||||
if (myCompilerTester != null) {
|
||||
myCompilerTester.tearDown();
|
||||
myCompilerTester = null;
|
||||
}
|
||||
myChecker = null;
|
||||
EdtTestUtil.runInEdtAndWait(() -> super.tearDown());
|
||||
//myChecker.checkValid(getTestProjectJdk());
|
||||
//probably some thread is destroyed right now because of log exception
|
||||
|
||||
Reference in New Issue
Block a user