test(store): wait for the archived count instead of assuming it arrived with the index - #571
Merged
Merged
Conversation
…ed with the index The index and its summary replicate on their own topics; the return to the parent follows the index, the archived count the summary. The test asserted the count the moment the selection moved, which the protocol never promised, and failed once on CI under load.
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.
Handled per CONTRIBUTING → "When a test fails, or is met on the way", for
store::tests::archiving_the_viewed_child_returns_to_its_parent, which failed once on Linux CI (#567's first run) and passed on rerun.tcode-uisuite — all pass locally; the CI failure was under the shared runner's load. The assertion readarchived(child)the momentselected_status(parent)turned true. Those are two replicated topics (the session index, and the index summary that carries the archived counts); the client applies whichever has arrived, and nothing in the protocol orders one before the other. The driver assumed an atomicity the app does not have — the same test already waits forarchived(sibling)in its second half.wait_untilthe sibling's is, with a comment naming the two topics.Checks:
cargo fmt --all --check;cargo nextest run -p tcode-ui --locked archiving_the_viewedpasses.