test(zebrad): cap the live-sync tests at 2 minutes per attempt - #11402
Draft
upbqdn wants to merge 1 commit into
Draft
test(zebrad): cap the live-sync tests at 2 minutes per attempt#11402upbqdn wants to merge 1 commit into
upbqdn wants to merge 1 commit into
Conversation
`sync_one_checkpoint_mainnet` and `restart_stop_at_height` normally take 10-30s, but they sync from live peers, and a slow peer stalls them with no bound: they use `MempoolBehavior::ShouldNotActivate`, so `sync_until` collects the whole output with `wait_with_output`, which `TestChild::with_timeout` does not bound. Nextest's `slow-timeout` was the only limit, and at `period = 5m, terminate-after = 2` a stalled attempt held the serial live-mainnet group for 10 minutes before the retry passed in seconds, doubling the unit-test job while still reporting success. Cap an attempt at 2 minutes, which is about nine times the runtime these tests need, and record why nextest has to be the limit here.
|
Warning No auditable source files found in this PR's diff. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Closes #11399.
Solution
Lower the per-attempt
slow-timeoutforintegration::sync::sync_one_checkpoint_mainnetand
integration::sync::restart_stop_at_heightfrom 10 minutes to 2, keeping their tworetries, and record in
.config/nextest.tomland onsync_untilwhy nextest has to bethe bound: with
MempoolBehavior::ShouldNotActivate,sync_untilwaits forzebradtoexit with
wait_with_output, whichTestChild::with_timeoutdoes not bound.Tests
These two tests sync from live peers, so a slow peer stalls them with no limit of their
own. A run on the changed config reproduced a stall and shows the new bound working: the
attempt was terminated at 120s and the retry passed in 7.6s, for 138s total where the old
600s cap would have spent about 610s.
Both tests pass unstalled in 7.6-13.7s, so 2 minutes leaves roughly nine times the
runtime they need. Making the wait itself bounded, so a stall fails where it happens
instead of relying on the test runner, is left to #11399's follow-up discussion.
AI Disclosure
PR Checklist
type(scope): description