tests: fix (hopefully) too short delay in 201_shutdown_event_race test
Domain shutdown handling may take extended amount of time, especially on slow machine (all the LVM teardown etc). Take care of it by synchronizing using vm.startup_lock, instead of increasing constant delay. This way, the shutdown event handler needs to be started within 3s, not finish in this time.
This commit is contained in:
parent
dfa0626cea
commit
4fa45dbc91
@ -232,6 +232,9 @@ class TC_00_Basic(qubes.tests.SystemTestCase):
|
||||
self.loop.run_until_complete(asyncio.sleep(1))
|
||||
# and give a chance for both domain-shutdown handlers to execute
|
||||
self.loop.run_until_complete(asyncio.sleep(3))
|
||||
# wait for running shutdown handler to complete
|
||||
self.loop.run_until_complete(self.vm.startup_lock.acquire())
|
||||
self.vm.startup_lock.release()
|
||||
|
||||
if self.test_failure_reason:
|
||||
self.fail(self.test_failure_reason)
|
||||
|
Loading…
Reference in New Issue
Block a user