Repository navigation
Fix two timing-dependent tests the release PR hit on Windows - #542
Merged
Merged
Conversation
With a 10 ms budget, the poll's wait can wake just before the deadline on Windows' coarse timer and read the task status once more before the timeout fires; the test required exactly one read and failed on the release PR's Windows 3.13 runner. For the timeout case it now checks what the waiter promises: submit first, one or more status reads, a pause last.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
The viewer panel connects off the GUI thread, and its clipboard authority is adopted when the connect answers. The reconnect case enqueued the new viewer's clipboard after a single processEvents(), so on a slow runner (the release PR's Windows 3.10) the connect had not answered yet and the authorised clipboard was dropped. It now settles the connect first, as the test's own _tab() helper does.
|
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_interrupted_wait_requests_pause_with_cancellation_suspended[timeout]failed on the release PR (#538), on the Windows 3.13 runner, with['submit', 'get', 'get', 'pause'].Cause. The test gives the waiter a 10 ms budget. On Windows' coarse timer, the poll's wait can wake just before the deadline, so the loop reads the status once more before the timeout fires.
Change. For the timeout case, the test now checks what the waiter actually promises:
The stop and cancel cases still require exactly
['submit', 'get', 'pause'].Second fix: the clipboard reconnect test.
test_queued_clipboard_from_a_disconnected_gui_viewer_cannot_apply_to_a_replacement[True-image-...]failed on the Windows 3.10 runner of #538 with "the current authorised clipboard was lost".processEvents(), before the connect had answered.settle(panel), as its own_tab()helper already does.