From d8a9cfa1a0840a78391bbd9e01de112878ccd76c Mon Sep 17 00:00:00 2001 From: Nipuna Ranasinghe Date: Wed, 8 Jan 2025 11:11:39 +0530 Subject: [PATCH] Disable intermittently failing debugger terminal tests on windows --- .../ProjectBasedRunInTerminalTest.java | 17 +++++++++++++++-- .../SingleFileRunInTerminalTest.java | 13 +++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/ProjectBasedRunInTerminalTest.java b/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/ProjectBasedRunInTerminalTest.java index 8e33c27d202e..f1fb254bf054 100644 --- a/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/ProjectBasedRunInTerminalTest.java +++ b/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/ProjectBasedRunInTerminalTest.java @@ -21,6 +21,7 @@ import org.ballerinalang.debugger.test.utils.DebugUtils; import org.ballerinalang.test.context.BallerinaTestException; import org.testng.Assert; +import org.testng.SkipException; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -29,6 +30,7 @@ * Test class to test the runInTerminal feature for project based sources. */ public class ProjectBasedRunInTerminalTest { + DebugTestRunner debugTestRunner; boolean didRunInIntegratedTerminal; @@ -41,6 +43,12 @@ public void setup() { @Test(description = "Debug launch test in integrated terminal for project based source") public void testRunInIntegratedTerminal() throws BallerinaTestException { + // Skipping the test on Windows + // TODO: enable after fixing intermittent failures + if (System.getProperty("os.name").toLowerCase().contains("win")) { + throw new SkipException("Skipping test on Windows OS"); + } + String integratedTerminal = "integrated"; debugTestRunner.setClientSupportsRunInTerminal(true); didRunInIntegratedTerminal = debugTestRunner.initDebugSession(DebugUtils.DebuggeeExecutionKind.RUN, @@ -50,6 +58,12 @@ public void testRunInIntegratedTerminal() throws BallerinaTestException { @Test(description = "Debug launch test in external terminal for project based source") public void testRunInExternalTerminal() throws BallerinaTestException { + // Skipping the test on Windows + // TODO: enable after fixing intermittent failures + if (System.getProperty("os.name").toLowerCase().contains("win")) { + throw new SkipException("Skipping test on Windows OS"); + } + String externalTerminal = "external"; debugTestRunner.setClientSupportsRunInTerminal(true); didRunInIntegratedTerminal = debugTestRunner.initDebugSession(DebugUtils.DebuggeeExecutionKind.RUN, @@ -87,8 +101,7 @@ public void testRunInUnsupportedClient() throws BallerinaTestException { @Test(description = "Debug launch test without runinterminal config") public void testLaunchWithoutConfig() throws BallerinaTestException { debugTestRunner.setClientSupportsRunInTerminal(true); - didRunInIntegratedTerminal = debugTestRunner.initDebugSession(DebugUtils.DebuggeeExecutionKind.RUN, - ""); + didRunInIntegratedTerminal = debugTestRunner.initDebugSession(DebugUtils.DebuggeeExecutionKind.RUN, ""); // returned value should be false since the runinterminal kind config wasn't set to launch the program in a // separate terminal diff --git a/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/SingleFileRunInTerminalTest.java b/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/SingleFileRunInTerminalTest.java index a29443844314..297c67d2a7ce 100644 --- a/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/SingleFileRunInTerminalTest.java +++ b/tests/jballerina-debugger-integration-test/src/test/java/org/ballerinalang/debugger/test/adapter/runinterminal/SingleFileRunInTerminalTest.java @@ -22,6 +22,7 @@ import org.ballerinalang.debugger.test.utils.DebugUtils; import org.ballerinalang.test.context.BallerinaTestException; import org.testng.Assert; +import org.testng.SkipException; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -43,6 +44,12 @@ public void setup() { @Test(description = "Debug launch test in integrated terminal for single file") public void testRunInIntegratedTerminal() throws BallerinaTestException { + // Skipping the test on Windows + // TODO: enable after fixing intermittent failures + if (System.getProperty("os.name").toLowerCase().contains("win")) { + throw new SkipException("Skipping test on Windows OS"); + } + String integratedTerminal = "integrated"; debugTestRunner.setClientSupportsRunInTerminal(true); didRunInIntegratedTerminal = debugTestRunner.initDebugSession(DebugUtils.DebuggeeExecutionKind.RUN, @@ -52,6 +59,12 @@ public void testRunInIntegratedTerminal() throws BallerinaTestException { @Test(description = "Debug launch test in external terminal for single file") public void testRunInExternalTerminal() throws BallerinaTestException { + // Skipping the test on Windows + // TODO: enable after fixing intermittent failures + if (System.getProperty("os.name").toLowerCase().contains("win")) { + throw new SkipException("Skipping test on Windows OS"); + } + String externalTerminal = "external"; debugTestRunner.setClientSupportsRunInTerminal(true); didRunInIntegratedTerminal = debugTestRunner.initDebugSession(DebugUtils.DebuggeeExecutionKind.RUN,