]> Cypherpunks.ru repositories - gostls13.git/commit
internal/testenv: remove RunWithTimout
authorBryan C. Mills <bcmills@google.com>
Wed, 26 Oct 2022 15:44:34 +0000 (11:44 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 31 Oct 2022 20:54:10 +0000 (20:54 +0000)
commite8ec68edfac4f50f57dd7faf039bb5c0f8eaba88
treed454c84525c510bddcf22ba7293099574dca8225
parent84cd7ab3c388fb3280cf426a35045d85cda99ff8
internal/testenv: remove RunWithTimout

For most tests, the test's deadline itself is more appropriate than an
arbitrary timeout layered atop of it (especially once #48157 is
implemented), and testenv.Command already adds cleaner timeout
behavior when a command would run too close to the test's deadline.

That makes RunWithTimeout something of an attractive nuisance. For
now, migrate the two existing uses of it to testenv.CommandContext,
with a shorter timeout implemented using context.WithTimeout.

As a followup, we may want to drop the extra timeouts from these
invocations entirely.

Updates #50436.
Updates #37405.

Change-Id: I16840fd36c0137b6da87ec54012b3e44661f0d08
Reviewed-on: https://go-review.googlesource.com/c/go/+/445597
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/internal/testenv/testenv.go
src/runtime/crash_test.go
src/runtime/runtime-gdb_test.go