diff --git a/p2p/transport/testsuite/stream_suite.go b/p2p/transport/testsuite/stream_suite.go index e04deaeb..f7172b46 100644 --- a/p2p/transport/testsuite/stream_suite.go +++ b/p2p/transport/testsuite/stream_suite.go @@ -206,7 +206,7 @@ func SubtestStress(t *testing.T, ta, tb transport.Transport, maddr ma.Multiaddr, openStreamAndRW := func(c mux.MuxedConn) { debugLog(t, "openStreamAndRW %p, %d opt.MsgNum", c, opt.MsgNum) - s, err := c.OpenStream() + s, err := c.OpenStream(context.Background()) if err != nil { errs <- fmt.Errorf("Failed to create NewStream: %s", err) return @@ -329,7 +329,7 @@ func SubtestStreamOpenStress(t *testing.T, ta, tb transport.Transport, maddr ma. go func() { defer wg.Done() for i := 0; i < count; i++ { - s, err := connA.OpenStream() + s, err := connA.OpenStream(context.Background()) if err != nil { t.Error(err) return @@ -384,7 +384,7 @@ func SubtestStreamReset(t *testing.T, ta, tb transport.Transport, maddr ma.Multi muxa, err := l.Accept() checkErr(t, err) - s, err := muxa.OpenStream() + s, err := muxa.OpenStream(context.Background()) if err != nil { panic(err) } diff --git a/p2p/transport/testsuite/transport_suite.go b/p2p/transport/testsuite/transport_suite.go index eef75bfb..234c43c4 100644 --- a/p2p/transport/testsuite/transport_suite.go +++ b/p2p/transport/testsuite/transport_suite.go @@ -126,7 +126,7 @@ func SubtestBasic(t *testing.T, ta, tb transport.Transport, maddr ma.Multiaddr, t.Fatal(err) } - s, err := connA.OpenStream() + s, err := connA.OpenStream(context.Background()) if err != nil { t.Fatal(err) } @@ -243,7 +243,7 @@ func SubtestPingPong(t *testing.T, ta, tb transport.Transport, maddr ma.Multiadd } for i := 0; i < streams; i++ { - s, err := connB.OpenStream() + s, err := connB.OpenStream(context.Background()) if err != nil { t.Error(err) continue