Another approach for making qvm-shutdown nice for tests

This commit is contained in:
Marek Marczykowski-Górecki 2017-12-10 22:52:29 +01:00
parent 5944de1eed
commit bc9fd47aa0
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ def interrupt_on_vm_shutdown(vms, subject, event):
'''Interrupt events processing when given VM was shutdown'''
# pylint: disable=unused-argument
if event == 'connection-established':
if all(vm.is_halted() for vm in vms):
if all(vm.is_halted() for vm in sorted(vms)):
raise Interrupt
elif event == 'domain-shutdown' and subject in vms:
vms.remove(subject)

View File

@ -83,7 +83,7 @@ def main(args=None, app=None): # pylint: disable=missing-docstring
# pylint: disable=no-member
loop.run_until_complete(asyncio.wait_for(
qubesadmin.events.utils.wait_for_domain_shutdown(
sorted(this_round_domains)),
this_round_domains),
args.timeout))
except asyncio.TimeoutError:
for vm in this_round_domains: