Navigation Menu

Skip to content

Commit

Permalink
[java] Fixing a CommandLine test
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Sep 28, 2018
1 parent 90d687e commit b891596
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/client/test/org/openqa/selenium/os/CommandLineTest.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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())
Expand Down

0 comments on commit b891596

Please sign in to comment.