Documentation
¶
Overview ¶
Package waittest bounds what a test waits for from another goroutine, so that a hang fails the test, naming what it waited for, instead of stalling the run until the test binary's own timeout.
Index ¶
- func For[T any](t testing.TB, ch <-chan T, what string) T
- func ForSlow[T any](t testing.TB, ch <-chan T, what string) T
- func Receive[T any](t testing.TB, ch <-chan T, what string) (T, bool)
- func Until(t testing.TB, cond func() bool, what string)
- func UntilSlow(t testing.TB, cond func() bool, what string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func For ¶
For returns the next value received from ch, failing the test when none arrives within the limit. A closed ch answers at once, which makes a channel closed as a signal one to wait for too.
func ForSlow ¶
ForSlow is For for slow work, a GPU worker on a software rasterizer or a scan of the system's fonts, with the longer slow limit.
func Receive ¶
Receive is For that reports, as a receive does, whether the value was sent (true) or ch was closed (false).
Types ¶
This section is empty.