Documentation
¶
Overview ¶
Package testwatch gives a test package a hard wall-clock limit shorter than go test's default ten minutes, so a lock that is never released fails the package in about a minute with a goroutine dump instead of freezing a CI host for fifteen (cam handoff 2026-10-13, the bundle operation-lock hang).
Use it from TestMain in packages that wait on file locks:
func TestMain(m *testing.M) { testwatch.Main(m, 90*time.Second) }
Inputs: the package's *testing.M and the limit. Output: crashes the test binary (exit 2) with all goroutine stacks in the panic message when the limit passes; otherwise the process exits with m.Run's code. Constraints: stdlib only; the limit must be well above the package's normal run time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.