Add polling helpers to replace time.Sleep in tests.
Goal: Deterministic, fast tests with clear failure messages.
Implementation:
- Create
internal/testutil/wait/
- Implement
Eventually(t, cond func() bool, timeout, interval, msg)
- Implement
Never(t, cond func() bool, duration)
- Replace
time.Sleep + assertion patterns in tests
Acceptance criteria:
- Helpers available
- Example usage in test
- Tests are faster and less flaky
Part of: #654
Requires: #645 (foundations)
Add polling helpers to replace time.Sleep in tests.
Goal: Deterministic, fast tests with clear failure messages.
Implementation:
internal/testutil/wait/Eventually(t, cond func() bool, timeout, interval, msg)Never(t, cond func() bool, duration)time.Sleep+ assertion patterns in testsAcceptance criteria:
Part of: #654
Requires: #645 (foundations)