]> Cypherpunks repositories - gostls13.git/commit
net: lengthen arbitrary SetDeadline timeout by a few orders of magnitude
authorBryan C. Mills <bcmills@google.com>
Thu, 16 Dec 2021 17:32:39 +0000 (12:32 -0500)
committerBryan Mills <bcmills@google.com>
Fri, 17 Dec 2021 02:00:14 +0000 (02:00 +0000)
commit55a25aa6ca03143bef38be7f6d618df51c569a66
tree344f1e340ae9b3f78094306beba4f85058e04704
parent63077bfcf563e3f2ef96fa51203ed2fad71a371c
net: lengthen arbitrary SetDeadline timeout by a few orders of magnitude

The "someTimeout" constant in the net test is “just to test that
net.Conn implementations don't explode when their SetFooDeadline
methods are called”. It was set to 10 seconds, which is short enough
that it could actually matter on some platforms.

Since the point of the constant is just to make sure methods don't
explode, we should set it to be at least a couple of orders of
magnitude longer than the test: then it is guaranteed not to have any
unintended side-effects.

Fixes #50227

Change-Id: If97ae7bef5e7f16b336d09ccc37f5ea2ea7e70b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/372796
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/conn_test.go