Allow constructing spdy executor from existing transports

This commit is contained in:
Jordan Liggitt
2017-11-17 15:47:46 -05:00
parent 56e62b684e
commit f82b1ba90e
3 changed files with 21 additions and 13 deletions

View File

@@ -256,7 +256,12 @@ func TestStream(t *testing.T) {
conf := &restclient.Config{
Host: server.URL,
}
e, err := remoteclient.NewSPDYExecutorForProtocols(conf, "POST", req.URL(), testCase.ClientProtocols...)
transport, upgradeTransport, err := spdy.RoundTripperFor(conf)
if err != nil {
t.Errorf("%s: unexpected error: %v", name, err)
continue
}
e, err := remoteclient.NewSPDYExecutorForProtocols(transport, upgradeTransport, "POST", req.URL(), testCase.ClientProtocols...)
if err != nil {
t.Errorf("%s: unexpected error: %v", name, err)
continue