(t *testing.T) {  server := newServer(t)  defer server.Shutdown()  conn := server.Dial(clientConfig())  defer conn.Close()   session, err := conn.NewSession()  if err != nil {   t.Fatalf("session failed: %v", err)  }  defer session.Close()   r, w := io.Pipe()  defer r.Close()  