Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
pass contexts to OpenStream in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Dec 17, 2020
1 parent 0c577bb commit 486206a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion listener_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package stream_test

import (
"context"
"io"
"sync"
"testing"
Expand Down Expand Up @@ -92,7 +93,7 @@ func TestConnectionsClosedIfNotAccepted(t *testing.T) {
errCh := make(chan error)
go func() {
defer conn.Close()
str, err := conn.OpenStream()
str, err := conn.OpenStream(context.Background())
if err != nil {
errCh <- err
return
Expand Down
2 changes: 1 addition & 1 deletion upgrader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func testConn(t *testing.T, clientConn, serverConn transport.CapableConn) {
t.Helper()
require := require.New(t)

cstr, err := clientConn.OpenStream()
cstr, err := clientConn.OpenStream(context.Background())
require.NoError(err)

_, err = cstr.Write([]byte("foobar"))
Expand Down

0 comments on commit 486206a

Please sign in to comment.