net: TestDialParallel spuriously fails due to hard-coded timeout in dialClosedPort #46884
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
We know from past experience that hard-coded timeouts lead to flaky tests. The
dialClosedPort
helper function has one such hard-coded timeout:go/src/net/dial_test.go
Lines 159 to 168 in 82517ac
The test provides no rationale for why we expect 1500ms to be a firm upper bound on Windows. For that matter, it provides no rationale as to why we expect 95 or 150ms to be firm upper bounds on other platforms.
And, indeed, it isn't a firm upper bound on those other platforms either:
go/src/net/dial_test.go
Lines 177 to 179 in 82517ac
So it comes as no surprise that the test consistently fails on my new Surface Book 3:
Probably the tests should be reworked not to rely on hard-coded timeouts at all.
The text was updated successfully, but these errors were encountered: