Skip to content

Commit

Permalink
Change failed transport test's name
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Jun 18, 2019
1 parent 93dbc71 commit 0228f68
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/dmsg/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ func TestServer_Serve(t *testing.T) {
}
})

t.Run("test failed accept not hanging already established transport", func(t *testing.T) {
t.Run("test failed_accept_should_not_hang_established_transport", func(t *testing.T) {
// generate keys for both clients
aPK, aSK := cipher.GenerateKeyPair()
bPK, bSK := cipher.GenerateKeyPair()
Expand Down Expand Up @@ -588,11 +588,9 @@ func TestServer_Serve(t *testing.T) {

// continue creating transports until the error occurs
for {
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)

_, err = a.Dial(ctx, bPK)
cancel()
if err != nil {
ctx := context.Background()
//ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond)
if _, err = a.Dial(ctx, bPK); err != nil {
break
}
}
Expand Down

0 comments on commit 0228f68

Please sign in to comment.