Documentation
¶
Overview ¶
Package testsync supplies minimal synchronisation helpers for tests that must wait on real-world, non-logical-time events (TCP accept, goroutine dispatch, counter updates driven by background workers). For logical-time waits (rate limiter refill, scheduler ticks) inject a fake clock instead — see pkg/beacon/scheduler.go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitFor ¶
WaitFor polls cond until it returns true or timeout elapses. On timeout it fails the test with t.Fatalf, naming the wait site via what so the diagnostic pinpoints the missing precondition. Callers should pass a short description ("tcp listener bound", "client registered", "n captures recorded") rather than the literal code.
Types ¶
This section is empty.