Files
ngit-grasp/tests/common
DanConwayDevandClaude Fable 5.1 6c3b33e3a6 test: poll wait_for_event_served at a fixed interval over one connection
wait_for_event_served opened a fresh client per poll, waited for the
connection in 100 ms steps, and backed off exponentially from 100 ms to
2 s between polls with a 2 s fetch timeout. Tests that reach it right after
a send, now that the covering sleeps are gone, could miss the first poll
while the relay was still promoting and then wait seconds for the next.

Connect once with try_connect, bounded by the caller's timeout, and poll
every 100 ms with a 1 s fetch timeout until the deadline. Healthy runs
still cost one round trip; slow runs detect the event within roughly one
interval instead of a growing backoff. Deadline and error semantics are
unchanged.

Validation: the two suites that use this helper most passed 20 unloaded,
20 loaded and 30 concurrent-contention samples with no failures and no
timing regression against the previous helper.

Assisted-by: Claude Fable 5.1
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-17 18:22:34 +00:00
..