From 6e347d9b07176b8bfddb442d08146aafcb2ee34c Mon Sep 17 00:00:00 2001 From: Nipuna Ranasinghe Date: Thu, 9 Jan 2025 13:43:42 +0530 Subject: [PATCH 1/2] Enable debugger terminal tests on windows --- .../ProjectBasedRunInTerminalTest.java | 13 ------------- .../runinterminal/SingleFileRunInTerminalTest.java | 14 +------------- 2 files changed, 1 insertion(+), 26 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 f1fb254bf054..691b9b51bb47 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,7 +21,6 @@ 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,12 +42,6 @@ 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, @@ -58,12 +51,6 @@ 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, 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 297c67d2a7ce..8529c32a8fa0 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,7 +22,6 @@ 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; @@ -31,6 +30,7 @@ * Test class to test the runInTerminal feature for single files. */ public class SingleFileRunInTerminalTest extends BaseTestCase { + DebugTestRunner debugTestRunner; boolean didRunInIntegratedTerminal; @@ -44,12 +44,6 @@ 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, @@ -59,12 +53,6 @@ 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, From 24ef7b5a752a73a38bac4a2d9814cf5dce9c7775 Mon Sep 17 00:00:00 2001 From: Nipuna Ranasinghe Date: Thu, 9 Jan 2025 13:47:16 +0530 Subject: [PATCH 2/2] Fix formatting --- .../adapter/runinterminal/ProjectBasedRunInTerminalTest.java | 1 - .../test/adapter/runinterminal/SingleFileRunInTerminalTest.java | 1 - 2 files changed, 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 691b9b51bb47..dd48de409358 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 @@ -29,7 +29,6 @@ * Test class to test the runInTerminal feature for project based sources. */ public class ProjectBasedRunInTerminalTest { - DebugTestRunner debugTestRunner; boolean didRunInIntegratedTerminal; 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 8529c32a8fa0..a29443844314 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 @@ -30,7 +30,6 @@ * Test class to test the runInTerminal feature for single files. */ public class SingleFileRunInTerminalTest extends BaseTestCase { - DebugTestRunner debugTestRunner; boolean didRunInIntegratedTerminal;