diff --git a/qubesmanager/tests/test_qube_manager.py b/qubesmanager/tests/test_qube_manager.py index 02040283..ef109cf9 100644 --- a/qubesmanager/tests/test_qube_manager.py +++ b/qubesmanager/tests/test_qube_manager.py @@ -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):