Skip to content

Commit b9e423b

Browse files
authored
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
1 parent e21b888 commit b9e423b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/integration/smoke/test_vm_schedule.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,10 @@ def test_05_vmschedule_test_e2e(self):
596596
time.sleep(30)
597597
current_state = self.virtual_machine.update(self.apiclient).state
598598
if previous_state != current_state:
599+
# Add these checks because VMs can take some time to start or stop
600+
if (previous_state == 'Starting' and current_state in ('Starting', 'Running')) or (
601+
previous_state == 'Stopping' and current_state in ('Stopping', 'Stopped')):
602+
continue
599603
self.debug(
600604
"VM changed state from %s to %s" % (previous_state, current_state)
601605
)

0 commit comments

Comments
 (0)