Skip to content

Commit e5ba7d3

Browse files
Bryan C. Millsneild
Bryan C. Mills
authored andcommitted
net/http: remove arbitrary timeout in TestServerHijackGetsBackgroundByte_big
This test fails with "timeout" once per couple of months. It may be that the arbitrary timeout is too short, or it may be that the test is detecting a real bug (perhaps a deadlock) and reporting it without sufficient information to debug. Either way, the arbitrary timeout is doing only harm: either it is too short, or it is preventing us from getting a useful goroutine dump when the test inevitably times out. Fixes #35498 (hopefully). Change-Id: Ic6bbb1ef8df2c111b9888ba9903f58633e7cb95d Reviewed-on: https://go-review.googlesource.com/c/go/+/369854 Trust: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Damien Neil <[email protected]>
1 parent 4c943ab commit e5ba7d3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/net/http/serve_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5998,11 +5998,7 @@ func TestServerHijackGetsBackgroundByte_big(t *testing.T) {
59985998
t.Fatal(err)
59995999
}
60006000

6001-
select {
6002-
case <-done:
6003-
case <-time.After(2 * time.Second):
6004-
t.Error("timeout")
6005-
}
6001+
<-done
60066002
}
60076003

60086004
// Issue 18319: test that the Server validates the request method.

0 commit comments

Comments
 (0)