]> Cypherpunks.ru repositories - gostls13.git/commit
net: remove hard-coded timeout in dialClosedPort test helper
authorBryan C. Mills <bcmills@google.com>
Wed, 23 Jun 2021 01:48:11 +0000 (21:48 -0400)
committerBryan C. Mills <bcmills@google.com>
Thu, 24 Jun 2021 03:45:33 +0000 (03:45 +0000)
commita9bb38222a06333176cafc5637083e0322277c09
tree356485304a7f49a5a0fe2dcca70b84955fbc36e4
parent86d72fa2cba51342ba5617abf43a732f9fd668ca
net: remove hard-coded timeout in dialClosedPort test helper

The helper function claims that dialing a closed port should be
"nearly instantaneous", but that is empirically not the case on
OpenBSD or Windows. The tests do not appear to be particularly
sensitive to the exact upper bound otherwise, so let's just
remove the arbitrary latency assumption.

Fixes #46884

Change-Id: If00c9fdc3063da6aaf60d365d4a2ee2c94dc6df1
Reviewed-on: https://go-review.googlesource.com/c/go/+/330250
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/dial_test.go