Skip to content

Give three skipped tests the isolation their skip reason asked for - #484

Open
JE-Chen wants to merge 1 commit into
mainfrom
feat/qt-thread-marshal-isolation
Open

Give three skipped tests the isolation their skip reason asked for#484
JE-Chen wants to merge 1 commit into
mainfrom
feat/qt-thread-marshal-isolation

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Aug 20, 2026

Copy link
Copy Markdown
Member

test_r3_gui_thread_marshal.py carried three @pytest.mark.skips whose own
reason named the fix:

needs subprocess isolation (see test_actions_menu_gui) … skip until then

They cover real wiring — that a file received on a WebRTC worker thread reaches
the GUI thread through a queued signal rather than a thread-affine
QTimer.singleShot, and that the admin console's thumbnail poll deletes its
QThread each tick instead of leaking one per interval.

Skipping them was right at the time. Building the WebRTC panel or the admin
console and then tearing a worker QThread down aborts the shared pytest
process under offscreen Qt. And because deleteLater is a no-op until an event
loop runs, the abort does not land in the test that caused it — it detonates
inside some later, unrelated file, with no traceback.

What changed

One probe runs all three checks in a child process, writes a JSON verdict per
check, and os._exit(0)s without teardown — the same shape
test_actions_menu_gui already uses for the full tab set.

Verdicts are ok, failed: … or unavailable: …, so a machine without the
[webrtc] extra (CI's pytest-headless) reports a skip, while a machine
that has it actually checks the wiring. That distinction matters: a blanket
importorskip would have hidden a real failure on developer machines too.

The checks have teeth — verified, not assumed

Deleting the single line thread.finished.connect(thread.deleteLater) from
admin_console_tab.py:

'thumbnail_reaped': 'failed: the QThread outlived finish'

…while panel_signals and webrtc_marshal stayed green, so the failure is
localised to the wiring it covers.

Result

The headless suite now runs end to end with no --ignore flags — 4,815
passing, exit 0. The 17 remaining skips are all optional-dependency or
platform gates (Darwin-only path, no module named openpyxl, …). No "skip
until then" is left in the suite.

Progress.md loses the entry, per the rule that it records only open items.

Their own reason said what they needed: "needs subprocess isolation (see
test_actions_menu_gui) ... skip until then". They cover real wiring — a
file received on a WebRTC worker thread reaching the GUI thread through a
queued signal rather than a thread-affine singleShot, and the admin
console's thumbnail poll deleting its QThread each tick instead of
leaking one per interval.

Skipping was right at the time. Building the WebRTC panel or the admin
console and then tearing a worker QThread down aborts the shared pytest
process under offscreen Qt, and since deleteLater is a no-op until an
event loop runs, the abort lands in some later unrelated file with no
traceback.

Run all three in one child process that writes a JSON verdict per check
and exits without teardown, the shape test_actions_menu_gui already uses.
Verdicts are ok / failed / unavailable, so a machine without the webrtc
extra reports a skip while one that has it checks the wiring.

Confirmed to have teeth rather than assumed: dropping
thread.finished.connect(thread.deleteLater) turns the third verdict into
"failed: the QThread outlived finish" and leaves the other two green.
@sonarqubecloud

Copy link
Copy Markdown

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 1 duplication

Metric Results
Complexity 0
Duplication 1

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.

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