The testing package already does this. go test should do the same thing.
Fixes: #69181
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: I942bd09c5832b48d498a2eb1f1500e1d294d0a2c
Reviewed-on: https://go-review.googlesource.com/c/go/+/648236
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
// to that timeout plus one minute. This is a backup alarm in case
// the test wedges with a goroutine spinning and its background
// timer does not get a chance to fire.
- // Don't set this if fuzzing, since it should be able to run
+ // Don't set this if fuzzing or benchmarking, since it should be able to run
// indefinitely.
- if testTimeout > 0 && testFuzz == "" {
+ if testTimeout > 0 && testFuzz == "" && testBench == "" {
// The WaitDelay for the test process depends on both the OS I/O and
// scheduling overhead and the amount of I/O generated by the test just
// before it exits. We set the minimum at 5 seconds to account for the OS