mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup - no need to wrap forceCloseProjectWithoutSaving into runInEdtAndWait anymore
GitOrigin-RevId: c17ae0db418455491e69e2911b50acf15996d9d9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0eb339bd58
commit
fe22573b2c
@@ -253,9 +253,7 @@ internal class ProjectStoreTest {
|
||||
assertThat(miscXml).contains("""<option name="AAvalue" value="foo" />""")
|
||||
}
|
||||
finally {
|
||||
runInEdt {
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(newProject)
|
||||
}
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(newProject)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,9 +54,7 @@ class StartupManagerTest {
|
||||
done.await(1, TimeUnit.SECONDS)
|
||||
}
|
||||
finally {
|
||||
runInEdtAndWait {
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(project)
|
||||
}
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(project)
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-3
@@ -48,9 +48,7 @@ class ProjectOpeningTest {
|
||||
override fun run(indicator: ProgressIndicator) {
|
||||
val project = ProjectManagerEx.getInstanceEx().openProject(foo, createTestOpenProjectOptions())
|
||||
if (project != null) {
|
||||
runInEdtAndWait {
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(project)
|
||||
}
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(project)
|
||||
}
|
||||
assertThat(project).isNull()
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ public class VfsUtilTest extends BareTestFixtureTestCase {
|
||||
finally {
|
||||
// this concoction is to ensure close() is called on the mock ProjectManagerImpl
|
||||
assertTrue(project.get().isOpen());
|
||||
ApplicationManager.getApplication().invokeAndWait(() -> PlatformTestUtil.forceCloseProjectWithoutSaving(project.get()));
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(project.get());
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.intellij.openapi.roots.ModuleRootModificationUtil
|
||||
import com.intellij.openapi.util.Computable
|
||||
import com.intellij.openapi.vfs.VfsUtil
|
||||
import com.intellij.testFramework.PlatformTestUtil
|
||||
import com.intellij.util.ui.UIUtil
|
||||
import java.io.File
|
||||
import java.nio.file.Paths
|
||||
|
||||
@@ -37,9 +36,7 @@ fun openProjectWithSdk(projectPath: String,
|
||||
return Pair(project, sdk)
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
UIUtil.invokeAndWaitIfNeeded(Runnable {
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(project)
|
||||
})
|
||||
PlatformTestUtil.forceCloseProjectWithoutSaving(project)
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user