John Snow <[email protected]> writes:
> Instead of using a hardcoded timeout, just rely on Avocado's built-in
> test case timeout. This helps avoid timeout issues on machines where 60
> seconds is not sufficient.
>
> Signed-off-by: John Snow <[email protected]>
> ---
> tests/avocado/acpi-bits.py | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/tests/avocado/acpi-bits.py b/tests/avocado/acpi-bits.py
> index 8745a58a766..ac13e22dc93 100644
> --- a/tests/avocado/acpi-bits.py
> +++ b/tests/avocado/acpi-bits.py
> @@ -385,12 +385,6 @@ def test_acpi_smbios_bits(self):
> self._vm.launch()
> # biosbits has been configured to run all the specified test suites
> # in batch mode and then automatically initiate a vm shutdown.
> - # sleep for maximum of one minute
> - max_sleep_time = time.monotonic() + 60
> - while self._vm.is_running() and time.monotonic() < max_sleep_time:
> - time.sleep(1)
> -
> - self.assertFalse(time.monotonic() > max_sleep_time,
> - 'The VM seems to have failed to shutdown in time')
> -
We might want some wait for consoles as well depending on what is output
during the run.
Ah! there's the catch I was forgetting. I subbed this in and it appeared to work, so I thought I was home free.
OK, back to the drawing board...
> + # Rely on avocado's unit test timeout.
> + self._vm.wait(timeout=None)
> self.parse_log()
--
Alex Bennée