diff --git a/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt b/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt index fa09e14be52..179350bc945 100644 --- a/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt +++ b/idea/tests/org/jetbrains/kotlin/AbstractImportsTest.kt @@ -62,7 +62,11 @@ abstract class AbstractImportsTest : KotlinLightCodeInsightFixtureTestCase() { codeStyleSettings.PACKAGES_TO_USE_STAR_IMPORTS.addEntry(KotlinPackageEntry(it.trim(), true)) } - val log = project.executeWriteCommand("") { doTest(file) } + val log = if (runTestInWriteCommand) { + project.executeWriteCommand("") { doTest(file) } + } else { + doTest(file) + } KotlinTestUtils.assertEqualsToFile(File("$testPath.after"), myFixture.file.text) if (log != null) { @@ -86,4 +90,6 @@ abstract class AbstractImportsTest : KotlinLightCodeInsightFixtureTestCase() { protected open val nameCountToUseStarImportForMembersDefault: Int get() = 3 + + protected open val runTestInWriteCommand: Boolean = true } \ No newline at end of file