Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/339'
Browse files Browse the repository at this point in the history
* origin/pr/339:
  Fix tests for python 3.11
  • Loading branch information
marmarek committed Feb 17, 2023
2 parents 2823b2c + c76965d commit 20368d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qubesmanager/tests/test_qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1464,13 +1464,15 @@ def _run_command_and_process_events(self, command, timeout=5,

if additional_timeout:
(done, pending) = self.loop.run_until_complete(
asyncio.wait({future1, future2}, timeout=timeout,
asyncio.wait({future1,
asyncio.create_task(future2)}, timeout=timeout,
return_when=asyncio.FIRST_COMPLETED))
(done, pending) = self.loop.run_until_complete(
asyncio.wait(pending, timeout=additional_timeout))
else:
(done, pending) = self.loop.run_until_complete(
asyncio.wait({future1, future2}, timeout=timeout))
asyncio.wait({future1,
asyncio.create_task(future2)}, timeout=timeout))

for task in pending:
with contextlib.suppress(asyncio.CancelledError):
Expand Down

0 comments on commit 20368d6

Please sign in to comment.