Skip to content

Commit 2f3db22

Browse files
crypto/tls: remove flaky cancellation test
This will be reintroduced again once the source of the flakiness has been determined and fixed. Fixes #45084 Change-Id: I6677b27fcd71e8c9bb8edbe8e3be70e5a271ebd3 Reviewed-on: https://go-review.googlesource.com/c/go/+/302569 Trust: Johan Brandhorst-Satzkorn <[email protected]> Trust: Katie Hockman <[email protected]> Run-TryBot: Johan Brandhorst-Satzkorn <[email protected]> Run-TryBot: Katie Hockman <[email protected]> Reviewed-by: Katie Hockman <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 72b501c commit 2f3db22

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

src/crypto/tls/handshake_client_test.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package tls
66

77
import (
88
"bytes"
9-
"context"
109
"crypto/rsa"
1110
"crypto/x509"
1211
"encoding/base64"
@@ -21,7 +20,6 @@ import (
2120
"os/exec"
2221
"path/filepath"
2322
"reflect"
24-
"runtime"
2523
"strconv"
2624
"strings"
2725
"testing"
@@ -2513,37 +2511,3 @@ func testResumptionKeepsOCSPAndSCT(t *testing.T, ver uint16) {
25132511
serverConfig.Certificates[0].SignedCertificateTimestamps, ccs.SignedCertificateTimestamps)
25142512
}
25152513
}
2516-
2517-
func TestClientHandshakeContextCancellation(t *testing.T) {
2518-
c, s := localPipe(t)
2519-
serverConfig := testConfig.Clone()
2520-
serverErr := make(chan error, 1)
2521-
ctx, cancel := context.WithCancel(context.Background())
2522-
defer cancel()
2523-
go func() {
2524-
defer close(serverErr)
2525-
defer s.Close()
2526-
conn := Server(s, serverConfig)
2527-
_, err := conn.readClientHello(ctx)
2528-
cancel()
2529-
serverErr <- err
2530-
}()
2531-
cli := Client(c, testConfig)
2532-
err := cli.HandshakeContext(ctx)
2533-
if err == nil {
2534-
t.Fatal("Client handshake did not error when the context was canceled")
2535-
}
2536-
if err != context.Canceled {
2537-
t.Errorf("Unexpected client handshake error: %v", err)
2538-
}
2539-
if err := <-serverErr; err != nil {
2540-
t.Errorf("Unexpected server error: %v", err)
2541-
}
2542-
if runtime.GOARCH == "wasm" {
2543-
t.Skip("conn.Close does not error as expected when called multiple times on WASM")
2544-
}
2545-
err = cli.Close()
2546-
if err == nil {
2547-
t.Error("Client connection was not closed when the context was canceled")
2548-
}
2549-
}

0 commit comments

Comments
 (0)