mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
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>