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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user