aboutsummaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-03-08 17:10:06 -0500
committerGopher Robot <gobot@golang.org>2023-03-08 23:17:17 +0000
commitd6fa0d2ef3fc29c38af2675d395a089cc73af996 (patch)
tree6c348220f4a82af9328fb257ae8bf7310c8b3f1a /src/net/http
parent618fb4ab068272cc87b137d9fc527210be4b8ad2 (diff)
downloadgo-d6fa0d2ef3fc29c38af2675d395a089cc73af996.tar.xz
net/http: remove arbitrary timeout in TestServerAllowsBlockingRemoteAddr
If the test actually deadlocks, we probably want a goroutine dump to debug it anyway. Otherwise, the arbitrary timeout can only cause spurious failures. Fixes #36179. Change-Id: Ic2037496959a38d3231eefdbc1dd5d45eebdf306 Reviewed-on: https://go-review.googlesource.com/c/go/+/474582 Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/net/http')
-rw-r--r--src/net/http/serve_test.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go
index b2bdeb10a1..343a358ef8 100644
--- a/src/net/http/serve_test.go
+++ b/src/net/http/serve_test.go
@@ -1354,13 +1354,7 @@ func testServerAllowsBlockingRemoteAddr(t *testing.T, mode testMode) {
// Start another request and grab its connection
response2c := make(chan string, 1)
go fetch(2, response2c)
- var conn2 net.Conn
-
- select {
- case conn2 = <-conns:
- case <-time.After(time.Second):
- t.Fatal("Second Accept didn't happen")
- }
+ conn2 := <-conns
// Send a response on connection 2.
conn2.(*blockingRemoteAddrConn).addrs <- &net.TCPAddr{