From 6f7d1a6f17234a73c23e0c8b93e696813ace1eb6 Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Fri, 1 Jul 2016 12:23:37 +0300 Subject: [PATCH] replace PlatformTestCase.isRunInEdt() with UsefulTestCase.runInDispatchThread(), there's no reason to keep both --- .../src/com/intellij/testFramework/PlatformTestCase.java | 6 +----- .../testSrc/com/intellij/vcs/test/VcsPlatformTest.kt | 2 +- .../test/org/jetbrains/plugins/github/test/GithubTest.java | 5 ----- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java b/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java index 07dc98d4578f..364d75814091 100644 --- a/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java @@ -708,12 +708,8 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro } } - protected boolean isRunInEdt() { - return true; - } - protected void runBareRunnable(ThrowableRunnable runnable) throws Throwable { - if (isRunInEdt()) { + if (runInDispatchThread()) { EdtTestUtil.runInEdtAndWait(runnable); } else { diff --git a/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt b/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt index dd9bc487be53..162f55382acd 100644 --- a/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt +++ b/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt @@ -88,7 +88,7 @@ abstract class VcsPlatformTest : PlatformTestCase() { // we don't need a module in Git tests } - override fun isRunInEdt(): Boolean { + override fun runInDispatchThread(): Boolean { return false } diff --git a/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java b/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java index b32f77b0c03a..da64988f5b16 100644 --- a/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java +++ b/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java @@ -206,9 +206,4 @@ public abstract class GithubTest extends GitPlatformTest { protected void afterTest() throws Exception { } - - @Override - protected boolean isRunInEdt() { - return true; - } }