Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions qubes/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,9 @@ def enter_keys_in_window(self, title, keys):
] + keys
subprocess.check_call(command)

def shutdown_and_wait(self, vm, timeout=60):
def shutdown_and_wait(self, vm, timeout=0):
if not timeout:
timeout = vm.shutdown_timeout
try:
self.loop.run_until_complete(
vm.shutdown(wait=True, timeout=timeout)
Expand All @@ -1414,8 +1416,10 @@ def shutdown_and_wait(self, vm, timeout=60):
del vm
self.fail("Timeout while waiting for VM {} shutdown".format(name))

def shutdown_paused(self, vm, timeout=60):
def shutdown_paused(self, vm, timeout=0):
self.loop.run_until_complete(vm.pause())
if not timeout:
timeout = vm.shutdown_timeout
with self.assertRaises(qubes.exc.QubesVMNotRunningError):
self.loop.run_until_complete(
vm.shutdown(wait=True, timeout=timeout, force=False)
Expand Down Expand Up @@ -1644,7 +1648,7 @@ async def wait_for_session(self, vm):
if getattr(vm, "template", None) and "whonix-w" in vm.template.name:
# first boot of whonix-ws takes more time because of /home
# initialization, including Tor Browser copying
timeout = 120
timeout = vm.qrexec_timeout
try:
await asyncio.wait_for(
vm.run_service_for_stdio(
Expand Down