]> Cypherpunks repositories - gostls13.git/commit
net/http: deflake TestServerCancelsReadHeaderTimeoutWhenIdle
authorBryan C. Mills <bcmills@google.com>
Wed, 14 Sep 2022 18:21:23 +0000 (14:21 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 16 Sep 2022 21:13:59 +0000 (21:13 +0000)
commita9ca741d311772efb828c4b4f45e737783a89ca3
treee13a45503e8e94bf9432b8c56944d2a38d1aa612
parent2addbf3f2a91e2caa0903c79a44d722e9bcd913d
net/http: deflake TestServerCancelsReadHeaderTimeoutWhenIdle

Return errors instead of calling t.Fatalf for timing-sensitive failure
modes. Scale the Sleep call to the timeout (so that it isn't too short
for the longer durations).

Fixes #54891.

Change-Id: I574e85e121becdda9ab8ee6bfd37c18a549d366d
Reviewed-on: https://go-review.googlesource.com/c/go/+/430955
Reviewed-by: Joel Sing <joel@sing.id.au>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/net/http/serve_test.go