Repository navigation
test: wait for the first tab to hear the draft settle before the late-refusal check - #6173
Merged
Merged
Conversation
… refusal
test_a_late_refusal_cannot_restore_an_attempt_another_tab_settled[None] holds the first tab's state read, so the only way that tab learns the second tab's send settled the shared attempt is the drafts read the same news look starts. The test waited for the server to hold the draft settled (until_draft_settled), which says nothing of what the tab has heard. When the refusal arrived before that drafts read landed, keepRefusedWords still found the unsettled record carrying the attempt, so the error covered the reply field rather than the panel, and the panel's wait ran out at 120 s into the state read's own timeout ("Lost the connection — reconnecting").
The test now waits on the tab's own copy through draftHasContent, which check-api.js exports for it. loadDraft can't answer this: it masks a generation while the tab is sending it. No product behavior changes.
Refs #3985
This was referenced Nov 16, 2026
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.
test_a_late_refusal_cannot_restore_an_attempt_another_tab_settled[None]failed in push run 43877886146 because the test refused the first tab's send before that tab had heard that the draft was settled. The test holds the first tab's state read, so that tab learns about the second tab's send only from the drafts read the same news look starts. The test waited for the server to hold the draft settled (until_draft_settled), which says nothing about what the tab has heard. When the refusal won the race,keepRefusedWordsstill found the tab's unsettled record carrying the refused attempt. It raised the error on the reply field rather than in the panel, so the panel wait ran until the held state read's 120 s timeout turned it into "Lost the connection — reconnecting".The test now waits on the tab's own copy, through
draftHasContent, whichcheck-api.jsnow exports.loadDraft(heard_draft) can't answer this, because it hides a generation while the tab is sending it. Product code is unchanged.Verification on this runner: the test failed 16 of 17 runs on
mainand on commits back to #6162, each time with the CI diagnostic. With the change, it passed 11 of 11. CI passed this test ate65b8507e, so it's timing-dependent, not a regression from a recent commit.Refs #3985 — automated triage