]> Cypherpunks repositories - gostls13.git/commit
net/http: deflake TestServerCancelsReadTimeoutWhenIdle
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 7 Dec 2017 19:51:08 +0000 (19:51 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 8 Dec 2017 00:31:55 +0000 (00:31 +0000)
commit95fab851fc1a88e64d7c016d53af25a349c4c888
tree0d9293585ceb6678ddeb9a4bdda28371c7203488
parent613f8cad90a4359e423f5accbbafeb7dacbd53a5
net/http: deflake TestServerCancelsReadTimeoutWhenIdle

I can reproduce with a very short timeout (fractions of a millisecond)
combined with -race.

But given that this is inherently sensitive to actual time, add a
testing mechanism to retry with increasingly large times to compensate
for busy buidlers. This also means the test is usually faster now,
too, since we can start with smaller durations.

Fixes #19608

Change-Id: I3a222464720195849da768e9801eb7b43baa4aeb
Reviewed-on: https://go-review.googlesource.com/82595
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/serve_test.go