]> Cypherpunks repositories - gostls13.git/commit
internal/testenv: adjust timeout calculations in CommandContext
authorBryan C. Mills <bcmills@google.com>
Tue, 1 Nov 2022 12:26:58 +0000 (08:26 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 1 Nov 2022 21:32:24 +0000 (21:32 +0000)
commit082afccebfc068207328fcaeb4b01e540784ff24
treeab277cddadde17a69320e1797976543598714f65
parent50c59194758999487f577030ca11d91c65530559
internal/testenv: adjust timeout calculations in CommandContext

I noticed some test failures in the build dashboard after CL 445597
that made me realize the grace period should be based on the test
timeout, not the Context timeout: if the test itself sets a short
timeout for a command, we still want to give the test process enough
time to consume and log its output.

I also put some more thought into how one might debug a test hang, and
realized that in that case we don't want to set a WaitDelay at all:
instead, we want to leave the processes in their stuck state so that
they can be investigated with tools like `ps` and 'lsof'.

Updates #50436.

Change-Id: I65421084f44eeaaaec5dd2741cd836e9e68dd380
Reviewed-on: https://go-review.googlesource.com/c/go/+/446875
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/internal/testenv/exec.go