@@ -35,7 +35,7 @@ func dial(handler serverType, t *testing.T) *Client {
35
35
}
36
36
conf .AddHostKey (testSigners ["rsa" ])
37
37
38
- _ , chans , reqs , err := NewServerConn (c1 , & conf )
38
+ conn , chans , reqs , err := NewServerConn (c1 , & conf )
39
39
if err != nil {
40
40
t .Fatalf ("Unable to handshake: %v" , err )
41
41
}
@@ -56,6 +56,9 @@ func dial(handler serverType, t *testing.T) *Client {
56
56
handler (ch , inReqs , t )
57
57
}()
58
58
}
59
+ if err := conn .Wait (); err != io .EOF {
60
+ t .Logf ("server exit reason: %v" , err )
61
+ }
59
62
}()
60
63
61
64
config := & ClientConfig {
@@ -358,10 +361,9 @@ func TestServerWindow(t *testing.T) {
358
361
}
359
362
written , err := copyNRandomly ("stdin" , serverStdin , origBuf , windowTestBytes )
360
363
if err != nil {
361
- t .Fatalf ("failed to copy origBuf to serverStdin: %v" , err )
362
- }
363
- if written != windowTestBytes {
364
- t .Fatalf ("Wrote only %d of %d bytes to server" , written , windowTestBytes )
364
+ t .Errorf ("failed to copy origBuf to serverStdin: %v" , err )
365
+ } else if written != windowTestBytes {
366
+ t .Errorf ("Wrote only %d of %d bytes to server" , written , windowTestBytes )
365
367
}
366
368
367
369
echoedBytes := <- result
0 commit comments