Fix ISE already disposed DefaultPicoContainer in Compiler Tests

Some test's won't create their own application, and assumes
that ApplicationManager.getApplication() is null

But CompilerEnvironmentTest had created application
somewhere inside compiler, disposed it, but forgot to reset
variable, causing few tests to fail because of not overridden
application
This commit is contained in:
Simon Ogorodnik
2017-10-03 20:42:34 +03:00
parent 0381b74fed
commit 237284d247
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.cli.common.ExitCode;
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler;
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase;
import org.junit.Assert;
import java.io.File;
@@ -53,4 +54,10 @@ public class CompileEnvironmentTest extends TestCase {
FileUtil.delete(tempDir);
}
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
KtUsefulTestCase.resetApplicationToNull();
}
}