Skip to content

Commit d6fa0d2

Browse files
Bryan C. Millsgopherbot
Bryan C. Mills
authored andcommitted
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 <[email protected]> Reviewed-by: Damien Neil <[email protected]> Run-TryBot: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 618fb4a commit d6fa0d2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/net/http/serve_test.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -1354,13 +1354,7 @@ func testServerAllowsBlockingRemoteAddr(t *testing.T, mode testMode) {
13541354
// Start another request and grab its connection
13551355
response2c := make(chan string, 1)
13561356
go fetch(2, response2c)
1357-
var conn2 net.Conn
1358-
1359-
select {
1360-
case conn2 = <-conns:
1361-
case <-time.After(time.Second):
1362-
t.Fatal("Second Accept didn't happen")
1363-
}
1357+
conn2 := <-conns
13641358

13651359
// Send a response on connection 2.
13661360
conn2.(*blockingRemoteAddrConn).addrs <- &net.TCPAddr{

0 commit comments

Comments
 (0)