diff --git a/python/testSrc/com/jetbrains/env/PyEnvTestCase.java b/python/testSrc/com/jetbrains/env/PyEnvTestCase.java index 0a7370d4b6c4..56493f530d38 100644 --- a/python/testSrc/com/jetbrains/env/PyEnvTestCase.java +++ b/python/testSrc/com/jetbrains/env/PyEnvTestCase.java @@ -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(); } /** diff --git a/python/testSrc/com/jetbrains/env/PyTestTask.java b/python/testSrc/com/jetbrains/env/PyTestTask.java index 79f4b49b1f6e..8bb243540c65 100644 --- a/python/testSrc/com/jetbrains/env/PyTestTask.java +++ b/python/testSrc/com/jetbrains/env/PyTestTask.java @@ -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(); } /**