Skip to content
Open
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
5 changes: 4 additions & 1 deletion tests/core/test_dragon.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,10 @@ def require_client(pid):
"cuphoton.core.mps",
SimpleNamespace(require_mps_client=require_client),
)
result = _run(tmp_path, mps_pipe_directory=pipe_directory)
# Check MPS initialization ordering without a short filesystem deadline.
result = _run(
tmp_path, mps_pipe_directory=pipe_directory, result_timeout=5.0
)
assert len(checked) == 2
assert result.status == ("success" if connected else "failed")
assert sorted(state.closed) == [0, 1]
Expand Down
15 changes: 10 additions & 5 deletions tests/xlens/test_nooa_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,17 @@ async def request(payload):
await asyncio.Event().wait()
return response("execute_python", {"code": "while True: pass"})

task = asyncio.create_task(run(request, timeout_seconds=8))
task = asyncio.create_task(
run(request, timeout_seconds=60 if cancel else 8)
)
if cancel:
await asyncio.wait_for(entered.wait(), 7)
task.cancel()
with pytest.raises(asyncio.CancelledError):
await bounded(task, processes)
try:
# Worker imports must finish before testing cancellation.
await asyncio.wait_for(entered.wait(), 30)
finally:
task.cancel()
with pytest.raises(asyncio.CancelledError):
await bounded(task, processes)
else:
with pytest.raises(backend.NooaError, match="deadline"):
await bounded(task, processes)
Expand Down
Loading