mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Add extra checks for test_vm_schedule to avoid intermittent failures (#8036)
This PR adds additional checks in test_vm_schedule to avoid intermittent failures
This commit is contained in:
parent
e21b8882e4
commit
b9e423b7a9
@ -596,6 +596,10 @@ class TestVMSchedule(cloudstackTestCase):
|
||||
time.sleep(30)
|
||||
current_state = self.virtual_machine.update(self.apiclient).state
|
||||
if previous_state != current_state:
|
||||
# Add these checks because VMs can take some time to start or stop
|
||||
if (previous_state == 'Starting' and current_state in ('Starting', 'Running')) or (
|
||||
previous_state == 'Stopping' and current_state in ('Stopping', 'Stopped')):
|
||||
continue
|
||||
self.debug(
|
||||
"VM changed state from %s to %s" % (previous_state, current_state)
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user