Skip to content

Commit

Permalink
Merge pull request #62 from libp2p/web3-bot/sync
Browse files Browse the repository at this point in the history
sync: update CI config files
  • Loading branch information
Stebalien authored Jul 21, 2021
2 parents 47c0c5c + d49ac8b commit 38a5d17
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions p2p/net/gostream/gostream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ func TestServerClient(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

go func(ctx context.Context) {
done := make(chan struct{})
go func() {
defer close(done)
listener, err := Listen(srvHost, tag)
if err != nil {
t.Error(err)
Expand Down Expand Up @@ -83,9 +85,8 @@ func TestServerClient(t *testing.T) {
t.Error(err)
return
}
<-ctx.Done()
}
}(ctx)
}()

clientConn, err := Dial(ctx, clientHost, srvHost.ID(), tag)
if err != nil {
Expand Down Expand Up @@ -138,4 +139,5 @@ func TestServerClient(t *testing.T) {
if err != nil {
t.Fatal(err)
}
<-done
}

0 comments on commit 38a5d17

Please sign in to comment.