Skip to content
Permalink
Browse files

[FIXED JENKINS-7809] expose child process stdout as InputStream.

 I added a mode where one can launch a child process without the built-in pumping support, making it trivial to read until EOF in the distributed environments.

 This concludes the fix.

Originally-Committed-As: 96dd84b5d0d37e1765c3615bcba048eb62e38ad6
  • Loading branch information
kohsuke committed Feb 16, 2011
1 parent b744e0c commit d4fe2dcee80c02264fa5b687f72e2ea0e8af3aeb
Showing with 20 additions and 0 deletions.
  1. +20 −0 test/src/main/java/org/jvnet/hudson/test/FakeLauncher.java
@@ -4,6 +4,8 @@
import hudson.Proc;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
* Fake a process launch.
@@ -47,5 +49,23 @@ public void kill() throws IOException, InterruptedException {
public int join() throws IOException, InterruptedException {
return exitCode;
}

@Override
public InputStream getStdout() {
// TODO
throw new UnsupportedOperationException();
}

@Override
public InputStream getStderr() {
// TODO
throw new UnsupportedOperationException();
}

@Override
public OutputStream getStdin() {
// TODO
throw new UnsupportedOperationException();
}
}
}

0 comments on commit d4fe2dc

Please sign in to comment.