diff options
| author | Bryan C. Mills <bcmills@google.com> | 2020-03-27 17:16:26 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-02-01 16:24:24 +0000 |
| commit | 6e668267ac89a07fdf9aa9ca0d19a4a9f3077c4b (patch) | |
| tree | f754ab3a7271fad002733e9f4c49e172ecf28a28 /src/net/http | |
| parent | 38d1a6665f20cb588810355ed4ea061c3b6a19ae (diff) | |
| download | go-6e668267ac89a07fdf9aa9ca0d19a4a9f3077c4b.tar.xz | |
net/http: remove another arbitrary timeout in TestTLSHandshakeTimeout
Updates #37327
Change-Id: I87774be71ed54e9c45a27062122e6177888e890a
Reviewed-on: https://go-review.googlesource.com/c/go/+/226137
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/serve_test.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go index eac527b94f..e11de66077 100644 --- a/src/net/http/serve_test.go +++ b/src/net/http/serve_test.go @@ -1444,13 +1444,9 @@ func testTLSHandshakeTimeout(t *testing.T, mode testMode) { t.Errorf("Read = %d, %v; want an error and no bytes", n, err) } - select { - case v := <-errc: - if !strings.Contains(v, "timeout") && !strings.Contains(v, "TLS handshake") { - t.Errorf("expected a TLS handshake timeout error; got %q", v) - } - case <-time.After(5 * time.Second): - t.Errorf("timeout waiting for logged error") + v := <-errc + if !strings.Contains(v, "timeout") && !strings.Contains(v, "TLS handshake") { + t.Errorf("expected a TLS handshake timeout error; got %q", v) } } |
