Skip to content

Commit

Permalink
ArgumentListBuilder2Test.slaveMask failure.
Browse files Browse the repository at this point in the history
(cherry picked from commit 83361ae)
  • Loading branch information
jglick committed Apr 2, 2019
1 parent 7ee034e commit 86348bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/hudson/Launcher.java
Expand Up @@ -761,6 +761,7 @@ protected final void printCommandLine(@Nonnull String[] cmd, @CheckForNull FileP
buf.append(c);
}
listener.getLogger().println(buf.toString());
listener.getLogger().flush();
}

/**
Expand Down
5 changes: 1 addition & 4 deletions test/src/test/java/hudson/util/ArgumentListBuilder2Test.java
Expand Up @@ -27,7 +27,6 @@
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.*;
import hudson.Functions;
import hudson.Launcher.LocalLauncher;
Expand All @@ -46,7 +45,6 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.StringWriter;
import java.net.URL;

/**
* @author Kohsuke Kawaguchi
Expand All @@ -71,8 +69,7 @@ public void slaveMask() throws Exception {

StringWriter out = new StringWriter();
assertEquals(0,s.createLauncher(new StreamTaskListener(out)).launch().cmds(args).join());
System.out.println(out);
assertTrue(out.toString().contains("$ java ********"));
assertThat(out.toString(), containsString("$ java ********"));
}

@Test
Expand Down

0 comments on commit 86348bb

Please sign in to comment.