From a1dabfefa0dd6eff63d04b0f78c9ce7b76871012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 13 Oct 2019 05:58:50 +0200 Subject: [PATCH] tests: fix network re-attach tests On slow systems (OpenQA), 5s isn't enough. Instead of hardcoding some timeout, simply wait for the full VM startup. --- qubes/tests/integ/network.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qubes/tests/integ/network.py b/qubes/tests/integ/network.py index aef53d06..af1e2e80 100644 --- a/qubes/tests/integ/network.py +++ b/qubes/tests/integ/network.py @@ -417,7 +417,7 @@ class VmNetworkingMixin(object): self.loop.run_until_complete(self.proxy.shutdown(force=True, wait=True)) self.loop.run_until_complete(self.proxy.start()) # wait for it to settle down - self.loop.run_until_complete(asyncio.sleep(5)) + self.loop.run_until_complete(self.wait_for_session(self.proxy)) self.assertEqual(self.run_cmd(self.testvm1, self.ping_ip), 0) def test_113_reattach_after_provider_kill(self): @@ -433,7 +433,7 @@ class VmNetworkingMixin(object): self.loop.run_until_complete(self.proxy.kill()) self.loop.run_until_complete(self.proxy.start()) # wait for it to settle down - self.loop.run_until_complete(asyncio.sleep(5)) + self.loop.run_until_complete(self.wait_for_session(self.proxy)) self.assertEqual(self.run_cmd(self.testvm1, self.ping_ip), 0) def test_114_reattach_after_provider_crash(self): @@ -457,7 +457,7 @@ class VmNetworkingMixin(object): 'timeout waiting for crash cleanup') self.loop.run_until_complete(self.proxy.start()) # wait for it to settle down - self.loop.run_until_complete(asyncio.sleep(5)) + self.loop.run_until_complete(self.wait_for_session(self.proxy)) self.assertEqual(self.run_cmd(self.testvm1, self.ping_ip), 0) def test_200_fake_ip_simple(self):