Skip to content

Fix two timing-dependent tests the release PR hit on Windows - #542

Merged
JE-Chen merged 3 commits into
devfrom
fix/dag-wait-timeout-test
Nov 2, 2026
Merged

JE-Chen merged 3 commits into
devfrom
fix/dag-wait-timeout-test

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

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:

  • submit first;
  • one or more status reads;
  • a pause last.

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".

  • Cause. The viewer panel connects off the GUI thread, and adopts its clipboard authority only when the connect answers. The reconnect case enqueued the new viewer's clipboard after a single processEvents(), before the connect had answered.
  • Change. The test now waits for the connect with settle(panel), as its own _tab() helper already does.

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.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.
@JE-Chen JE-Chen changed the title Allow a second status read before a 10 ms DAG wait budget runs out Fix two timing-dependent tests the release PR hit on Windows Nov 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@JE-Chen
JE-Chen merged commit e070b5e into dev Nov 2, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant