diff --git a/java/client/test/org/openqa/selenium/os/CommandLineTest.java b/java/client/test/org/openqa/selenium/os/CommandLineTest.java index 3461e9e9d48ad..1046987e63952 100644 --- a/java/client/test/org/openqa/selenium/os/CommandLineTest.java +++ b/java/client/test/org/openqa/selenium/os/CommandLineTest.java @@ -20,6 +20,7 @@ import static java.lang.System.getenv; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.openqa.selenium.Platform.WINDOWS; import static org.openqa.selenium.os.CommandLine.getLibraryPathPropertyName; import org.junit.Assume; @@ -137,7 +138,8 @@ public void canCopyOutput() { @Test public void canDetectSuccess() { - CommandLine commandLine = new CommandLine(testExecutable, "localhost"); + CommandLine commandLine = new CommandLine( + testExecutable, (Platform.getCurrent().is(WINDOWS) ? "-n" : "-c"), "3", "localhost"); commandLine.execute(); assertThat(commandLine.isSuccessful()).isTrue(); assertThat(commandLine.getExitCode()).isEqualTo(0); @@ -153,7 +155,7 @@ public void canDetectFailure() { @Test public void canUpdateLibraryPath() { - Assume.assumeTrue(Platform.getCurrent().is(Platform.WINDOWS)); + Assume.assumeTrue(Platform.getCurrent().is(WINDOWS)); CommandLine commandLine = new CommandLine(testExecutable); commandLine.updateDynamicLibraryPath("C:\\My\\Tools"); assertThat(commandLine.getEnvironment())