|
@@ -35,7 +35,7 @@ func dial(handler serverType, t *testing.T) *Client {
|
|
|
}
|
|
}
|
|
|
conf.AddHostKey(testSigners["rsa"])
|
|
conf.AddHostKey(testSigners["rsa"])
|
|
|
|
|
|
|
|
- _, chans, reqs, err := NewServerConn(c1, &conf)
|
|
|
|
|
|
|
+ conn, chans, reqs, err := NewServerConn(c1, &conf)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
t.Fatalf("Unable to handshake: %v", err)
|
|
t.Fatalf("Unable to handshake: %v", err)
|
|
|
}
|
|
}
|
|
@@ -56,6 +56,9 @@ func dial(handler serverType, t *testing.T) *Client {
|
|
|
handler(ch, inReqs, t)
|
|
handler(ch, inReqs, t)
|
|
|
}()
|
|
}()
|
|
|
}
|
|
}
|
|
|
|
|
+ if err := conn.Wait(); err != io.EOF {
|
|
|
|
|
+ t.Logf("server exit reason: %v", err)
|
|
|
|
|
+ }
|
|
|
}()
|
|
}()
|
|
|
|
|
|
|
|
config := &ClientConfig{
|
|
config := &ClientConfig{
|
|
@@ -358,10 +361,9 @@ func TestServerWindow(t *testing.T) {
|
|
|
}
|
|
}
|
|
|
written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes)
|
|
written, err := copyNRandomly("stdin", serverStdin, origBuf, windowTestBytes)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
- t.Fatalf("failed to copy origBuf to serverStdin: %v", err)
|
|
|
|
|
- }
|
|
|
|
|
- if written != windowTestBytes {
|
|
|
|
|
- t.Fatalf("Wrote only %d of %d bytes to server", written, windowTestBytes)
|
|
|
|
|
|
|
+ t.Errorf("failed to copy origBuf to serverStdin: %v", err)
|
|
|
|
|
+ } else if written != windowTestBytes {
|
|
|
|
|
+ t.Errorf("Wrote only %d of %d bytes to server", written, windowTestBytes)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
echoedBytes := <-result
|
|
echoedBytes := <-result
|