Modified test to be less prone to timeouts
This commit is contained in:
parent
822707f9f9
commit
b5daca5d57
@ -1187,10 +1187,13 @@ class QubeManagerTest(unittest.TestCase):
|
|||||||
|
|
||||||
future1 = asyncio.ensure_future(self.dispatcher.listen_for_events())
|
future1 = asyncio.ensure_future(self.dispatcher.listen_for_events())
|
||||||
self.loop.run_until_complete(asyncio.sleep(0))
|
self.loop.run_until_complete(asyncio.sleep(0))
|
||||||
|
|
||||||
future2 = asyncio.create_subprocess_exec(*command,
|
future2 = asyncio.create_subprocess_exec(*command,
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL)
|
stderr=subprocess.DEVNULL)
|
||||||
|
|
||||||
|
future2 = self.loop.run_until_complete(future2).wait()
|
||||||
|
|
||||||
if additional_timeout:
|
if additional_timeout:
|
||||||
(done, pending) = self.loop.run_until_complete(
|
(done, pending) = self.loop.run_until_complete(
|
||||||
asyncio.wait({future1, future2}, timeout=timeout,
|
asyncio.wait({future1, future2}, timeout=timeout,
|
||||||
|
Loading…
Reference in New Issue
Block a user