aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2021-11-03 22:15:17 -0400
committerBryan C. Mills <bcmills@google.com>2021-11-04 14:11:01 +0000
commita3f7be9b8cee00aa281a0bedeae22b4cd4bc64dd (patch)
tree495b2d252af996ee0ed425ffb9a29c943c62a8ef /src/cmd
parent2622235a99800d1d7add47c5c138f5efbe51361c (diff)
downloadgo-a3f7be9b8cee00aa281a0bedeae22b4cd4bc64dd.tar.xz
net/http: reduce TestClientTimeout_h{1,2} latency
The test had been setting an arbitrary 200ms timeout to allow the server's handler to set up before timing out. That is not only potentially flaky on slow machines, but also typically much longer than necessary. Replace the hard-coded timeout with a much shorter initial timeout, and use exponential backoff to lengthen it if needed. This allows the test to be run about 20x faster in the typical case, which may make it easier to reproduce rare failure modes by running with a higher -count flag. For #43120 Change-Id: I1e0d0ec99d5a107fff56e3bcc7174d686ec582d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/361275 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/cmd')
0 files changed, 0 insertions, 0 deletions