mirror of https://github.com/xemu-project/xemu.git
python/machine.py: change default wait timeout to 3 seconds
Machine.wait() does not appear to be used except in the acceptance tests, and an infinite timeout by default in a test suite is not the most helpful. Change it to 3 seconds, like the default shutdown timeout. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200710050649.32434-13-jsnow@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
de6e08b5b9
commit
04f0e36eba
|
@ -486,12 +486,12 @@ class QEMUMachine:
|
||||||
"""
|
"""
|
||||||
self.shutdown(hard=True)
|
self.shutdown(hard=True)
|
||||||
|
|
||||||
def wait(self, timeout: Optional[int] = None) -> None:
|
def wait(self, timeout: Optional[int] = 3) -> None:
|
||||||
"""
|
"""
|
||||||
Wait for the VM to power off and perform post-shutdown cleanup.
|
Wait for the VM to power off and perform post-shutdown cleanup.
|
||||||
|
|
||||||
:param timeout: Optional timeout in seconds.
|
:param timeout: Optional timeout in seconds.
|
||||||
Default None, an infinite wait.
|
Default 3 seconds, A value of None is an infinite wait.
|
||||||
"""
|
"""
|
||||||
self.shutdown(has_quit=True, timeout=timeout)
|
self.shutdown(has_quit=True, timeout=timeout)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue