提交 0f1ab580 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-8703] we still need to wait for the pipe to connect

before letting the writer loose.
上级 67ce74fc
......@@ -169,7 +169,7 @@ public final class Pipe implements Serializable {
// we want 'oidRos' to send data to this PipedOutputStream
FastPipedOutputStream pos = new FastPipedOutputStream();
FastPipedInputStream pis = new FastPipedInputStream(pos);
final int oidPos = channel.export(pos);
final int oidPos = channel.export(pos,false); // this gets unexported when the remote ProxyOutputStream closes.
// tell 'ros' to connect to our 'pos'.
channel.send(new ConnectCommand(oidRos, oidPos));
......
......@@ -126,7 +126,13 @@ abstract class PipeWindow {
static class Real extends PipeWindow {
private int available;
/**
* Total bytes that left our side of the channel.
*/
private long written;
/**
* Total bytes that the remote side acked.
*/
private long acked;
private final int oid;
/**
......
......@@ -32,8 +32,10 @@ public class Driver8703 {
foo();
return null;
} catch (Exception e) {
e.printStackTrace();
throw e;
} catch (Throwable t) {
t.printStackTrace();
throw new Exception(t);
} finally {
Thread.currentThread().setName("done");
......
......@@ -36,6 +36,7 @@ import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.lang.Thread.UncaughtExceptionHandler;
import java.util.Arrays;
import java.util.concurrent.ExecutionException;
......@@ -175,6 +176,8 @@ public class PipeTest extends RmiTestBase implements Serializable {
// make sure the pipe is connected
target.ensureConnected();
channel.syncLocalIO();
// then let the writer commence
writer.start();
// make sure that some data arrived to the receiver
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册