Browse Source
tls: fix flaky TestHandshakeConnectionCancellations test (#1896)
pull/1921/head
Marten Seemann
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
p2p/security/tls/transport_test.go
|
|
@ -324,7 +324,7 @@ func TestHandshakeConnectionCancellations(t *testing.T) { |
|
|
|
}() |
|
|
|
ctx, cancel := context.WithCancel(context.Background()) |
|
|
|
cancel() |
|
|
|
_, err = clientTransport.SecureOutbound(ctx, clientInsecureConn, serverID) |
|
|
|
_, err = clientTransport.SecureOutbound(ctx, &delayedConn{Conn: clientInsecureConn, delay: 5 * time.Millisecond}, serverID) |
|
|
|
require.ErrorIs(t, err, context.Canceled) |
|
|
|
require.Error(t, <-errChan) |
|
|
|
}) |
|
|
|