]> Cypherpunks repositories - gostls13.git/commit
time: fallback to slower TestTicker test after one failure
authorDamien Neil <dneil@google.com>
Wed, 4 Aug 2021 23:07:28 +0000 (16:07 -0700)
committerDamien Neil <dneil@google.com>
Wed, 6 Oct 2021 23:01:01 +0000 (23:01 +0000)
commit4ffa2f1c23d5d43be18c4ebf74ca553119683670
treedcd3270951d539ffe9e55f53fdc429528d4ab247
parent4002616f9a34410797e7bbff142c374a1de3ac6b
time: fallback to slower TestTicker test after one failure

TestTicker is sensitive to overloaded or slow systems, where a 20ms
ticker running for 10 ticks has a total run time out of the range
[110ms, 290ms]. To counter this flakiness, it tries five times to
get a successful result. This is insufficient--an overloaded test
machine can introduce more than 100ms of delay across the test.

Reduce the five attempts to two, but use a 1s ticker for 8 ticks
in the second attempt.

Updates #46474.
Updates #35692.

Change-Id: Ibd5187b00ccceeb981b652f2af9a1c3766357b78
Reviewed-on: https://go-review.googlesource.com/c/go/+/339892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/time/tick_test.go