Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion test/unit_test/headless/test_dag_managed_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,15 @@ def endpoint(operation, _body, _timeout):
result = run_dag(definition(payload), stop_event=stop)
assert not result.succeeded
assert result.nodes["one"].result["input_released"] is None
assert calls == ["submit", "get", "pause"]
if reason == "timeout":
# A 10 ms budget: the poll's wait can wake just before the deadline on a coarse
# (Windows) timer and read the status once more before the budget runs out.
assert calls[0] == "submit", calls
assert calls[-1] == "pause", calls
assert calls[1:-1], calls
assert set(calls[1:-1]) == {"get"}, calls
else:
assert calls == ["submit", "get", "pause"]


def test_owner_revocation_during_poll_stops_dispatch_and_preserves_review(tmp_path, monkeypatch):
Expand Down
2 changes: 2 additions & 0 deletions test/unit_test/headless/test_remote_clipboard_delivery_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pytest

pytest.importorskip('PySide6.QtWidgets', exc_type=ImportError)
from headless._qt_settle import settle
from headless.test_remote_registry_owners_gui import qapp as qapp, _tab
from je_auto_control.utils.clipboard import clipboard
from je_auto_control.utils.rbac import AuthorizationContext, Role, UserStore, authorization_scope, current_authorization
Expand Down Expand Up @@ -42,6 +43,7 @@ def test_queued_clipboard_from_a_disconnected_gui_viewer_cannot_apply_to_a_repla
panel._disconnect()
if reconnect:
panel._connect()
settle(panel) # the connect runs off the GUI thread; its viewer is adopted when it answers
qapp.processEvents()
assert applied == [], 'the queued clipboard from the old connection changed local state'
if reconnect:
Expand Down