Check leaks right after test for fast-fail

This commit is contained in:
Ilya.Kazakevich
2018-07-06 23:54:32 +03:00
parent 4039d32479
commit f75d9d803f
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -10,6 +10,7 @@ import com.intellij.openapi.ui.TestDialog;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.testFramework.LeakHunter;
import com.intellij.testFramework.LoggedErrorProcessor;
import com.intellij.testFramework.UsefulTestCase;
import com.intellij.util.ArrayUtil;
@@ -343,6 +344,8 @@ public abstract class PyEnvTestCase {
// We can stop message capturing even if it was not started as cleanup process.
stopMessageCapture();
Disposer.dispose(myDisposable);
LeakHunter.checkProjectLeak();
LeakHunter.checkNonDefaultProjectLeak();
}
/**
+3
View File
@@ -2,6 +2,7 @@ package com.jetbrains.env;
import com.google.common.collect.Sets;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.testFramework.LeakHunter;
import com.jetbrains.python.psi.LanguageLevel;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -33,6 +34,8 @@ public abstract class PyTestTask {
* Each inheritor may do anything on edt, but should call parent *after all* on main thread
*/
public void tearDown() throws Exception {
LeakHunter.checkNonDefaultProjectLeak();
LeakHunter.checkProjectLeak();
}
/**