This test expects dials of a closed port to complete in about the same
amount of time: an initial probe value +/- 20%. Reduce test flakes on
Windows by increasing the slop to +/- 50% of the original value.
Fixes #52173
Change-Id: I813492c36aca2b0264b3b5b8c96e8bf97193af76
Reviewed-on: https://go-review.googlesource.com/c/go/+/408354
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
// We used to always use 95 milliseconds as the slop,
// but that was flaky on Windows. See issue 35616.
slop := 95 * time.Millisecond
- if fifth := tt.expectElapsed / 5; fifth > slop {
- slop = fifth
+ if half := tt.expectElapsed / 2; half > slop {
+ slop = half
}
expectElapsedMin := tt.expectElapsed - slop
expectElapsedMax := tt.expectElapsed + slop