Repository navigation
test(net): wait out the jittered retry after a reset renewal - #5865
Conversation
a_reset_renewal_ends_only_its_request waited for the re-advertisement with poll_until, which gives up after 100 one-millisecond settles. That advertisement rides the retry, armed at jitter(RETRY_BASE), 50 to 100 ms after the reset, and a millisecond or two of the budget is already spent by then, so a jitter near the top of its window failed the test (about 1 in 50). Assert the reset request was withdrawn, sleep RETRY_BASE on the simulated clock, then look for the fresh advertisement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merge summary: test-only fix for the (Written by Claude Opus 5.5) |
Fixes the flaky
ietf::publisher::tests::a_reset_renewal_ends_only_its_request, which knocked #5736 out of the merge queue.Root cause
The test, not the product code. After the peer resets the renewal's stream, the loop withdraws the request and re-advertises the namespace on its retry, armed at
jitter(RETRY_BASE): a random 50 to 100 ms. The test waited for that advertisement withpoll_until, which gives up after 100 one-millisecond settles, a millisecond or two of which are spent before the retry is armed. A jitter near the top of its window therefore landed past the budget. Pinningjitterto returndelayfails the test every time.The jitter is intended (it spreads a relay's retries), and the simulated clock stays deterministic apart from that one random draw.
Fix
Assert the reset request was withdrawn,
moq_clock::sleep(RETRY_BASE)on the simulated clock, then look for the fresh advertisement. The wait now covers the whole jitter window by construction rather than by poll count.No other
poll_untilcaller in this module waits on the retry;an_unanswered_renewal_advertises_againalready loops for 20 simulated seconds.Verification
jittertemporarily pinned to its minimum (50 ms) and maximum (100 ms): both pass; the maximum failed deterministically before.just checkpasses.API and wire impact
None. Test-only change.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code