Add annotation to prevent test invocation twice

Cause: it helps to fix double inversion of muted non-flaky tests result
(KTI-216).
This commit is contained in:
Yunir Salimzyanov
2020-05-19 15:08:32 +03:00
parent a256e75909
commit 8d51b027ed
17 changed files with 62 additions and 43 deletions
@@ -69,6 +69,7 @@ import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.StringWriter; import java.io.StringWriter;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.*; import java.util.*;
@@ -755,7 +756,7 @@ public class KotlinTestUtils {
} }
private static void runTestImpl(@NotNull DoTest test, @Nullable TestCase testCase, String testDataFilePath) throws Exception { private static void runTestImpl(@NotNull DoTest test, @Nullable TestCase testCase, String testDataFilePath) throws Exception {
if (testCase != null) { if (testCase != null && !isRunTestOverridden(testCase)) {
Function0<Unit> wrapWithMuteInDatabase = MuteWithDatabaseKt.wrapWithMuteInDatabase(testCase, () -> { Function0<Unit> wrapWithMuteInDatabase = MuteWithDatabaseKt.wrapWithMuteInDatabase(testCase, () -> {
try { try {
test.invoke(testDataFilePath); test.invoke(testDataFilePath);
@@ -770,11 +771,20 @@ public class KotlinTestUtils {
return; return;
} }
} }
MuteWithFileKt.testWithMuteInFile(test, testCase).invoke(testDataFilePath);
}
DoTest wrappedTest = testCase != null ? private static boolean isRunTestOverridden(TestCase testCase) {
MuteWithFileKt.testWithMuteInFile(test, testCase) : Class<?> type = testCase.getClass();
MuteWithFileKt.testWithMuteInFile(test, ""); while (type != null) {
wrappedTest.invoke(testDataFilePath); for (Annotation annotation : type.getDeclaredAnnotations()) {
if (annotation.annotationType().equals(WithMutedInDatabaseRunTest.class)) {
return true;
}
}
type = type.getSuperclass();
}
return false;
} }
private static DoTest testWithCustomIgnoreDirective(DoTest test, TargetBackend targetBackend, String ignoreDirective) throws Exception { private static DoTest testWithCustomIgnoreDirective(DoTest test, TargetBackend targetBackend, String ignoreDirective) throws Exception {
@@ -300,3 +300,5 @@ fun isIgnoredInDatabaseWithLog(testCase: TestCase): Boolean {
fun TestCase.runTest(test: () -> Unit) { fun TestCase.runTest(test: () -> Unit) {
(wrapWithMuteInDatabase(this, test) ?: test).invoke() (wrapWithMuteInDatabase(this, test) ?: test).invoke()
} }
annotation class WithMutedInDatabaseRunTest
@@ -17,8 +17,8 @@ private val AUTOMATICALLY_GENERATE_FAIL_FILE_FOR_FAILED_TESTS: Boolean = false
annotation class MuteExtraSuffix(val value: String = "") annotation class MuteExtraSuffix(val value: String = "")
@Throws(Exception::class) @Throws(Exception::class)
fun testWithMuteInFile(test: DoTest, testCase: TestCase): DoTest { fun testWithMuteInFile(test: DoTest, testCase: TestCase?): DoTest {
val extraSuffix = testCase.javaClass.getAnnotation(MuteExtraSuffix::class.java)?.value ?: "" val extraSuffix = testCase?.javaClass?.getAnnotation(MuteExtraSuffix::class.java)?.value ?: ""
return testWithMuteInFile(test, extraSuffix) return testWithMuteInFile(test, extraSuffix)
} }
@@ -20,7 +20,8 @@ import com.intellij.openapi.util.io.FileUtil
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
import org.jetbrains.kotlin.config.KotlinCompilerVersion import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.jetbrains.kotlin.config.LanguageVersion import org.jetbrains.kotlin.config.LanguageVersion
import org.jetbrains.kotlin.test.isIgnoredInDatabaseWithLog import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.runTest
import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase
import org.jetbrains.kotlin.utils.addIfNotNull import org.jetbrains.kotlin.utils.addIfNotNull
import org.junit.Assert import org.junit.Assert
@@ -29,6 +30,7 @@ import org.xml.sax.helpers.DefaultHandler
import java.io.File import java.io.File
import javax.xml.parsers.SAXParserFactory import javax.xml.parsers.SAXParserFactory
@WithMutedInDatabaseRunTest
class KotlinVersionsTest : KtUsefulTestCase() { class KotlinVersionsTest : KtUsefulTestCase() {
fun testVersionsAreConsistent() { fun testVersionsAreConsistent() {
val versionPattern = "(\\d+)\\.(\\d+)(\\.(\\d+)|-SNAPSHOT)?".toRegex() val versionPattern = "(\\d+)\\.(\\d+)(\\.(\\d+)|-SNAPSHOT)?".toRegex()
@@ -143,7 +145,7 @@ class KotlinVersionsTest : KtUsefulTestCase() {
private fun Collection<Any>.areEqual(): Boolean = all(first()::equals) private fun Collection<Any>.areEqual(): Boolean = all(first()::equals)
override fun shouldRunTest(): Boolean { override fun runTest() {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this) runTest { super.runTest() }
} }
} }
@@ -10,7 +10,9 @@ import com.intellij.codeInsight.completion.CompletionTestCase;
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess; import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess;
import com.intellij.util.ArrayUtil; import com.intellij.util.ArrayUtil;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest;
@WithMutedInDatabaseRunTest
abstract public class KotlinCompletionTestCase extends CompletionTestCase { abstract public class KotlinCompletionTestCase extends CompletionTestCase {
@Override @Override
protected void setUp() throws Exception { protected void setUp() throws Exception {
@@ -51,14 +51,15 @@ import org.jetbrains.jps.model.java.JavaSourceRootProperties;
import org.jetbrains.jps.model.java.JavaSourceRootType; import org.jetbrains.jps.model.java.JavaSourceRootType;
import org.jetbrains.jps.model.module.JpsModuleSourceRootType; import org.jetbrains.jps.model.module.JpsModuleSourceRootType;
import org.jetbrains.kotlin.idea.test.KotlinSdkCreationChecker; import org.jetbrains.kotlin.idea.test.KotlinSdkCreationChecker;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import static org.jetbrains.kotlin.test.MuteWithDatabaseKt.isIgnoredInDatabaseWithLog; @WithMutedInDatabaseRunTest
public abstract class MavenImportingTestCase extends MavenTestCase { public abstract class MavenImportingTestCase extends MavenTestCase {
protected MavenProjectsTree myProjectsTree; protected MavenProjectsTree myProjectsTree;
protected MavenProjectsManager myProjectsManager; protected MavenProjectsManager myProjectsManager;
@@ -103,8 +104,8 @@ public abstract class MavenImportingTestCase extends MavenTestCase {
} }
@Override @Override
protected boolean shouldRunTest() { protected void runTest() throws Throwable {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this); KotlinTestUtils.runTestWithThrowable(this, () -> super.runTest());
} }
protected void assertModules(String... expectedNames) { protected void assertModules(String... expectedNames) {
@@ -18,13 +18,17 @@ package org.jetbrains.kotlin.idea.test;
import com.intellij.codeInsight.CodeInsightTestCase; import com.intellij.codeInsight.CodeInsightTestCase;
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess; import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess;
import kotlin.Unit;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.MuteWithDatabaseKt;
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest;
import static org.jetbrains.kotlin.test.MuteWithDatabaseKt.isIgnoredInDatabaseWithLog; import static org.jetbrains.kotlin.test.MuteWithDatabaseKt.isIgnoredInDatabaseWithLog;
/** /**
* Please use KotlinLightCodeInsightFixtureTestCase as the base class for all new tests. * Please use KotlinLightCodeInsightFixtureTestCase as the base class for all new tests.
*/ */
@WithMutedInDatabaseRunTest
@Deprecated @Deprecated
public abstract class KotlinCodeInsightTestCase extends CodeInsightTestCase { public abstract class KotlinCodeInsightTestCase extends CodeInsightTestCase {
@Override @Override
@@ -40,7 +44,7 @@ public abstract class KotlinCodeInsightTestCase extends CodeInsightTestCase {
} }
@Override @Override
protected boolean shouldRunTest() { protected void runTest() throws Throwable {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this); KotlinTestUtils.runTestWithThrowable(this, () -> super.runTest());
} }
} }
@@ -29,6 +29,7 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@@ -37,8 +38,7 @@ import java.io.OutputStreamWriter;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Collection; import java.util.Collection;
import static org.jetbrains.kotlin.test.MuteWithDatabaseKt.isIgnoredInDatabaseWithLog; @WithMutedInDatabaseRunTest
public abstract class KotlinLightCodeInsightFixtureTestCaseBase extends LightCodeInsightFixtureTestCase { public abstract class KotlinLightCodeInsightFixtureTestCaseBase extends LightCodeInsightFixtureTestCase {
@NotNull @NotNull
@Override @Override
@@ -60,11 +60,6 @@ public abstract class KotlinLightCodeInsightFixtureTestCaseBase extends LightCod
protected final Collection<File> myFilesToDelete = new THashSet<>(); protected final Collection<File> myFilesToDelete = new THashSet<>();
private final TempFiles myTempFiles = new TempFiles(myFilesToDelete); private final TempFiles myTempFiles = new TempFiles(myFilesToDelete);
@Override
protected boolean shouldRunTest() {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this);
}
@Override @Override
protected void tearDown() throws Exception { protected void tearDown() throws Exception {
myTempFiles.deleteAll(); myTempFiles.deleteAll();
@@ -30,6 +30,7 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@@ -38,8 +39,7 @@ import java.io.OutputStreamWriter;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Collection; import java.util.Collection;
import static org.jetbrains.kotlin.test.MuteWithDatabaseKt.isIgnoredInDatabaseWithLog; @WithMutedInDatabaseRunTest
public abstract class KotlinLightCodeInsightFixtureTestCaseBase extends LightCodeInsightFixtureTestCase { public abstract class KotlinLightCodeInsightFixtureTestCaseBase extends LightCodeInsightFixtureTestCase {
@NotNull @NotNull
@Override @Override
@@ -65,11 +65,6 @@ public abstract class KotlinLightCodeInsightFixtureTestCaseBase extends LightCod
protected final Collection<File> myFilesToDelete = new THashSet<>(); protected final Collection<File> myFilesToDelete = new THashSet<>();
private final TempFiles myTempFiles = new TempFiles(myFilesToDelete); private final TempFiles myTempFiles = new TempFiles(myFilesToDelete);
@Override
protected boolean shouldRunTest() {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this);
}
@Override @Override
protected void tearDown() throws Exception { protected void tearDown() throws Exception {
myTempFiles.deleteAll(); myTempFiles.deleteAll();
@@ -33,11 +33,8 @@ import org.jetbrains.kotlin.idea.debugger.test.util.KotlinOutputChecker
import org.jetbrains.kotlin.idea.debugger.test.util.LogPropagator import org.jetbrains.kotlin.idea.debugger.test.util.LogPropagator
import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
import org.jetbrains.kotlin.test.Directives import org.jetbrains.kotlin.test.*
import org.jetbrains.kotlin.test.KotlinBaseTest.TestFile import org.jetbrains.kotlin.test.KotlinBaseTest.TestFile
import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.TestMetadata
import org.jetbrains.kotlin.test.isIgnoredInDatabaseWithLog
import org.jetbrains.kotlin.test.testFramework.runWriteAction import org.jetbrains.kotlin.test.testFramework.runWriteAction
import org.junit.ComparisonFailure import org.junit.ComparisonFailure
import java.io.File import java.io.File
@@ -48,6 +45,7 @@ internal const val TEST_LIBRARY_NAME = "TestLibrary"
class TestFiles(val originalFile: File, val wholeFile: TestFile, files: List<TestFile>) : List<TestFile> by files class TestFiles(val originalFile: File, val wholeFile: TestFile, files: List<TestFile>) : List<TestFile> by files
@WithMutedInDatabaseRunTest
abstract class KotlinDescriptorTestCase : DescriptorTestCase() { abstract class KotlinDescriptorTestCase : DescriptorTestCase() {
private lateinit var testAppDirectory: File private lateinit var testAppDirectory: File
private lateinit var sourcesOutputDirectory: File private lateinit var sourcesOutputDirectory: File
@@ -233,8 +231,8 @@ abstract class KotlinDescriptorTestCase : DescriptorTestCase() {
return super.getData(dataId) return super.getData(dataId)
} }
override fun shouldRunTest(): Boolean { override fun runTest() {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this) runTest { super.runTest() }
} }
protected fun getTestDirectoryPath(): String = javaClass.getAnnotation(TestMetadata::class.java).value protected fun getTestDirectoryPath(): String = javaClass.getAnnotation(TestMetadata::class.java).value
@@ -42,10 +42,12 @@ import org.jetbrains.kotlin.samWithReceiver.SamWithReceiverCommandLineProcessor.
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
import org.jetbrains.kotlin.test.MockLibraryUtil import org.jetbrains.kotlin.test.MockLibraryUtil
import org.jetbrains.kotlin.test.TestJdkKind.FULL_JDK import org.jetbrains.kotlin.test.TestJdkKind.FULL_JDK
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.runTest import org.jetbrains.kotlin.test.runTest
import org.junit.Assert.assertNotEquals import org.junit.Assert.assertNotEquals
import org.junit.runner.RunWith import org.junit.runner.RunWith
@WithMutedInDatabaseRunTest
@RunWith(JUnit3WithIdeaConfigurationRunner::class) @RunWith(JUnit3WithIdeaConfigurationRunner::class)
open class MultiModuleHighlightingTest : AbstractMultiModuleHighlightingTest() { open class MultiModuleHighlightingTest : AbstractMultiModuleHighlightingTest() {
override fun getTestDataPath() = PluginTestCaseBase.getTestDataPathBase() + "/multiModuleHighlighting/" override fun getTestDataPath() = PluginTestCaseBase.getTestDataPathBase() + "/multiModuleHighlighting/"
@@ -24,11 +24,14 @@ import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase.* import org.jetbrains.kotlin.idea.test.PluginTestCaseBase.*
import org.jetbrains.kotlin.idea.util.getProjectJdkTableSafe import org.jetbrains.kotlin.idea.util.getProjectJdkTableSafe
import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.isIgnoredInDatabaseWithLog import org.jetbrains.kotlin.test.isIgnoredInDatabaseWithLog
import org.jetbrains.kotlin.test.runTest
import org.jetbrains.kotlin.utils.PathUtil import org.jetbrains.kotlin.utils.PathUtil
import java.io.File import java.io.File
import java.nio.file.Path import java.nio.file.Path
@WithMutedInDatabaseRunTest
abstract class AbstractConfigureKotlinTest : PlatformTestCase() { abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
@@ -132,8 +135,8 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
UsefulTestCase.assertDoesntExist(File(JS_CONFIGURATOR.getDefaultPathToJarFile(project))) UsefulTestCase.assertDoesntExist(File(JS_CONFIGURATOR.getDefaultPathToJarFile(project)))
} }
override fun shouldRunTest(): Boolean { override fun runTest() {
return super.shouldRunTest() && !isIgnoredInDatabaseWithLog(this) return runTest { super.runTest() }
} }
companion object { companion object {
@@ -10,9 +10,11 @@ import junit.framework.TestCase
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.runTest import org.jetbrains.kotlin.test.runTest
import org.junit.runner.RunWith import org.junit.runner.RunWith
@WithMutedInDatabaseRunTest
@RunWith(JUnit3WithIdeaConfigurationRunner::class) @RunWith(JUnit3WithIdeaConfigurationRunner::class)
class NavigateFromJSLibrarySourcesTest : AbstractNavigateFromLibrarySourcesTest() { class NavigateFromJSLibrarySourcesTest : AbstractNavigateFromLibrarySourcesTest() {
fun testIcon() { fun testIcon() {
@@ -15,10 +15,12 @@ import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor
import org.jetbrains.kotlin.psi.KtClass import org.jetbrains.kotlin.psi.KtClass
import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtClassOrObject
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.runTest import org.jetbrains.kotlin.test.runTest
import org.junit.runner.RunWith import org.junit.runner.RunWith
import kotlin.test.assertTrue import kotlin.test.assertTrue
@WithMutedInDatabaseRunTest
@RunWith(JUnit3WithIdeaConfigurationRunner::class) @RunWith(JUnit3WithIdeaConfigurationRunner::class)
class NavigateFromLibrarySourcesTest : AbstractNavigateFromLibrarySourcesTest() { class NavigateFromLibrarySourcesTest : AbstractNavigateFromLibrarySourcesTest() {
fun testJdkClass() { fun testJdkClass() {
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner import org.jetbrains.kotlin.test.JUnit3WithIdeaConfigurationRunner
import org.jetbrains.kotlin.test.runTest
import org.junit.runner.RunWith import org.junit.runner.RunWith
@RunWith(JUnit3WithIdeaConfigurationRunner::class) @RunWith(JUnit3WithIdeaConfigurationRunner::class)
@@ -47,9 +46,7 @@ class CoroutineNonBlockingContextDetectionTest : KotlinLightCodeInsightFixtureTe
} }
private fun doTest(fileName: String) { private fun doTest(fileName: String) {
runTest { myFixture.configureByFile(fileName)
myFixture.configureByFile(fileName) myFixture.testHighlighting(true, false, false, fileName)
myFixture.testHighlighting(true, false, false, fileName)
}
} }
} }
@@ -19,8 +19,10 @@ package org.jetbrains.kotlin.jps.build
import org.jetbrains.jps.builders.JpsBuildTestCase import org.jetbrains.jps.builders.JpsBuildTestCase
import org.jetbrains.jps.model.library.JpsLibrary import org.jetbrains.jps.model.library.JpsLibrary
import org.jetbrains.kotlin.compilerRunner.JpsKotlinCompilerRunner import org.jetbrains.kotlin.compilerRunner.JpsKotlinCompilerRunner
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.runTest import org.jetbrains.kotlin.test.runTest
@WithMutedInDatabaseRunTest
abstract class BaseKotlinJpsBuildTestCase : JpsBuildTestCase() { abstract class BaseKotlinJpsBuildTestCase : JpsBuildTestCase() {
@Throws(Exception::class) @Throws(Exception::class)
override fun setUp() { override fun setUp() {
@@ -14,6 +14,7 @@ import com.intellij.psi.PsiManager
import com.intellij.rt.execution.junit.FileComparisonFailure import com.intellij.rt.execution.junit.FileComparisonFailure
import junit.framework.TestCase import junit.framework.TestCase
import org.jetbrains.kotlin.test.IdeaSystemPropertiesForParallelRunConfigurator import org.jetbrains.kotlin.test.IdeaSystemPropertiesForParallelRunConfigurator
import org.jetbrains.kotlin.test.WithMutedInDatabaseRunTest
import org.jetbrains.kotlin.test.runTest import org.jetbrains.kotlin.test.runTest
import org.jetbrains.uast.UastContext import org.jetbrains.uast.UastContext
import org.jetbrains.uast.UastLanguagePlugin import org.jetbrains.uast.UastLanguagePlugin
@@ -21,6 +22,7 @@ import org.jetbrains.uast.evaluation.UEvaluatorExtension
import org.jetbrains.uast.java.JavaUastLanguagePlugin import org.jetbrains.uast.java.JavaUastLanguagePlugin
import java.io.File import java.io.File
@WithMutedInDatabaseRunTest
abstract class AbstractTestWithCoreEnvironment : TestCase() { abstract class AbstractTestWithCoreEnvironment : TestCase() {
companion object { companion object {