aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/panic.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-01-10 12:59:16 -0500
committerGopher Robot <gobot@golang.org>2023-01-19 20:46:09 +0000
commit2f8f51724ad2a3509603d53d8a850f9146e4016f (patch)
tree31e649ed103e8cf1e39e3249ff303d64cd6f3c86 /src/runtime/panic.go
parent24a9d7bc1834d6a4019a965c759d2282fa029229 (diff)
downloadgo-2f8f51724ad2a3509603d53d8a850f9146e4016f.tar.xz
cmd/go/internal/lockedfile: avoid failing tests due to arbitrary timeouts
The mustBlock helper returns a function that verifies that the blocked operation does eventually complete. However, it used an arbitrary 10-second timeout in place of “eventually”. Since the test is checking a synchronization library, bugs are likely to manifest as deadlocks. It may be useful to log what operation is in flight if such a deadlock occurs; however, since we can't bound how long a “reasonable” operation should take, the log message should only be informational — it should not cause the test to fail. While we're here, let's also set a better example by not leaking time.After timers in the tests.. Fixes #57592. Change-Id: I4e74e42390679bffac7a286824acb71b08994c17 Reviewed-on: https://go-review.googlesource.com/c/go/+/461000 Reviewed-by: Damien Neil <dneil@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/runtime/panic.go')
0 files changed, 0 insertions, 0 deletions