]> Cypherpunks repositories - gostls13.git/commit
os/signal: derive TestAtomicStop timeout from overall test timeout
authorBryan C. Mills <bcmills@google.com>
Fri, 25 Oct 2019 17:55:10 +0000 (13:55 -0400)
committerBryan C. Mills <bcmills@google.com>
Fri, 25 Oct 2019 18:44:06 +0000 (18:44 +0000)
commit096126de6b33a0c7831aebcdde00081876991438
tree9fa3a4fc886c67650f0fb32e60f6a57296fd1ebd
parent3d457f1a3669f8609018bfdc981de7da2f0e95d9
os/signal: derive TestAtomicStop timeout from overall test timeout

Previously, TestAtomicStop used a hard-coded 2-second timeout.

That empirically is not long enough on certain builders. Rather than
adjusting it to a different arbitrary value, use a slice of the
overall timeout for the test binary. If everything is working, we
won't block nearly that long anyway.

Updates #35085

Change-Id: I7b789388e3152413395088088fc497419976cf5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/203499
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/signal/signal_test.go