From b5daca5d57abce6d4f6653b06f0d08cd37625364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Wed, 7 Oct 2020 16:30:59 +0200 Subject: [PATCH] Modified test to be less prone to timeouts --- qubesmanager/tests/test_qube_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qubesmanager/tests/test_qube_manager.py b/qubesmanager/tests/test_qube_manager.py index bf745ad..811a280 100644 --- a/qubesmanager/tests/test_qube_manager.py +++ b/qubesmanager/tests/test_qube_manager.py @@ -1187,10 +1187,13 @@ class QubeManagerTest(unittest.TestCase): future1 = asyncio.ensure_future(self.dispatcher.listen_for_events()) self.loop.run_until_complete(asyncio.sleep(0)) + future2 = asyncio.create_subprocess_exec(*command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + future2 = self.loop.run_until_complete(future2).wait() + if additional_timeout: (done, pending) = self.loop.run_until_complete( asyncio.wait({future1, future2}, timeout=timeout,