Skip to content

Commit

Permalink
assert_shutdown: Sleep for 1 second even on svirt (#688)
Browse files Browse the repository at this point in the history
POO#15790

With some recent changes the assumption that with SSH the round of
checking VM status takes about 1 second and that no other sleep is
required (PR#669) is no longer valid.

Now even via SSH it takes just 0.1 second
(https://openqa.suse.de/tests/698139/file/autoinst-log.txt):

15:45:54.8191 8873 Connection to root@openqaw6-kvm.qa.suse.de
established
15:45:54.9165 8873 Command executed: ! virsh dominfo openQA-SUT-1 | grep
-w 'shut off', ret=0
15:45:55.0000 8873 Connection to root@openqaw6-kvm.qa.suse.de
established
15:45:55.0992 8873 Command executed: ! virsh dominfo openQA-SUT-1 | grep
-w 'shut off', ret=0

Hence the check for system status takes only around 10 second and some
VMs (e.g. KVM with UEFI) may not make it:
https://openqa.suse.de/tests/698139#step/shutdown/3.
  • Loading branch information
Michal Nowak authored and coolo committed Jan 5, 2017
1 parent 84d91e6 commit 2040b64
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions testapi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1313,9 +1313,7 @@ sub assert_shutdown {
$autotest::current_test->take_screenshot('ok');
return;
}
# svirt backend uses SSH in is_shutdown() so it takes around 1 second
# to get result anyway - no need to sleep explicitly
sleep 1 unless check_var('BACKEND', 'svirt');
sleep 1;
--$timeout;
}
$autotest::current_test->take_screenshot('fail');
Expand Down

0 comments on commit 2040b64

Please sign in to comment.