Skip to content

Commit 4f4e0b4

Browse files
committed
Merge remote-tracking branch 'origin/pr/765'
* origin/pr/765: Respect shutdown_timeout property on tests Pull request description: For: QubesOS/openqa-tests-qubesos#49 For: QubesOS/qubes-issues#1512 --- Failed to shutdown disposable template on Debian: https://openqa.qubes-os.org/tests/162497#step/system_tests/27 The test does: - start 2 disposable templates - shuts down 2 disposable templates
2 parents f68b057 + 3027486 commit 4f4e0b4

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

qubes/tests/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,9 @@ def enter_keys_in_window(self, title, keys):
14051405
] + keys
14061406
subprocess.check_call(command)
14071407

1408-
def shutdown_and_wait(self, vm, force=False, timeout=60):
1408+
def shutdown_and_wait(self, vm, force=False, timeout=0):
1409+
if not timeout:
1410+
timeout = vm.shutdown_timeout
14091411
try:
14101412
self.loop.run_until_complete(
14111413
vm.shutdown(wait=True, force=force, timeout=timeout)
@@ -1415,8 +1417,10 @@ def shutdown_and_wait(self, vm, force=False, timeout=60):
14151417
del vm
14161418
self.fail("Timeout while waiting for VM {} shutdown".format(name))
14171419

1418-
def shutdown_paused(self, vm, timeout=60):
1420+
def shutdown_paused(self, vm, timeout=0):
14191421
self.loop.run_until_complete(vm.pause())
1422+
if not timeout:
1423+
timeout = vm.shutdown_timeout
14201424
with self.assertRaises(qubes.exc.QubesVMNotRunningError):
14211425
self.loop.run_until_complete(
14221426
vm.shutdown(wait=True, timeout=timeout, force=False)
@@ -1645,7 +1649,7 @@ async def wait_for_session(self, vm):
16451649
if getattr(vm, "template", None) and "whonix-w" in vm.template.name:
16461650
# first boot of whonix-ws takes more time because of /home
16471651
# initialization, including Tor Browser copying
1648-
timeout = 120
1652+
timeout = vm.qrexec_timeout
16491653
try:
16501654
await asyncio.wait_for(
16511655
vm.run_service_for_stdio(

0 commit comments

Comments
 (0)