mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
gui-tests-framework: changed system property name to "idea.test.guimode"
This commit is contained in:
@@ -95,8 +95,6 @@ public abstract class GuiTestCase {
|
||||
return;
|
||||
}
|
||||
|
||||
assertEquals(System.getProperty("idea.test.guiTestMode"), "true");
|
||||
|
||||
Application application = ApplicationManager.getApplication();
|
||||
assertNotNull(application); // verify that we are using the IDE's ClassLoader.
|
||||
setUpDefaultProjectCreationLocationPath();
|
||||
|
||||
@@ -66,7 +66,8 @@ public class _FirstInSuiteTest extends TestCase {
|
||||
// so we try to forcibly terminate EDT here to urge JVM to re-spawn new shiny permanent EDT-1
|
||||
|
||||
//replacing of IdeEventQueue may cause problems with RepaintManager and EventQueue especially on Windows for GUI tests
|
||||
if (!System.getProperty("idea.test.guiTestMode").toLowerCase().equals("true")) {
|
||||
boolean guiTestMode = Boolean.getBoolean("idea.test.guimode");
|
||||
if (!guiTestMode) {
|
||||
TestRunnerUtil.replaceIdeEventQueueSafely();
|
||||
}
|
||||
SwingUtilities.invokeAndWait(() -> System.out.println("EDT is " + Thread.currentThread()));
|
||||
|
||||
@@ -43,18 +43,20 @@ import java.util.concurrent.TimeUnit;
|
||||
@SuppressWarnings("JUnitTestClassNamingConvention")
|
||||
public class _LastInSuiteTest extends TestCase {
|
||||
public void testProjectLeak() throws Exception {
|
||||
if (System.getProperty("GuiTestMode") == null || System.getProperty("GuiTestMode").equals("false")) {
|
||||
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
LightPlatformTestCase.initApplication(); // in case nobody cared to init. LightPlatformTestCase.disposeApplication() would not work otherwise.
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
boolean guiTestMode = Boolean.getBoolean("idea.test.guimode");
|
||||
if (!guiTestMode) {
|
||||
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
LightPlatformTestCase.initApplication(); // in case nobody cared to init. LightPlatformTestCase.disposeApplication() would not work otherwise.
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// disposes default projects too
|
||||
|
||||
Reference in New Issue
Block a user