Skip to content

Commit

Permalink
Disable intermittently failing debugger terminal tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
NipunaRanasinghe committed Jan 8, 2025
1 parent 53f6d83 commit d8a9cfa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,6 +30,7 @@
* Test class to test the runInTerminal feature for project based sources.
*/
public class ProjectBasedRunInTerminalTest {

DebugTestRunner debugTestRunner;
boolean didRunInIntegratedTerminal;

Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit d8a9cfa

Please sign in to comment.