Skip to content

Commit 3b93575

Browse files
vishesh92Locharla, Sandeep
authored andcommitted
Fixing CI failures (#12789)
* Fixing CI failures * fixup: test_secondary_storage
1 parent 09e7de6 commit 3b93575

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

test/integration/smoke/test_secondary_storage.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ def test_01_sys_vm_start(self):
136136
'Up',
137137
"Check state of primary storage pools is Up or not"
138138
)
139-
for _ in range(2):
139+
# Poll until all SSVMs are Running, or timeout after 3 minutes
140+
timeout = 180
141+
interval = 15
142+
list_ssvm_response = []
143+
while timeout > 0:
140144
list_ssvm_response = list_ssvms(
141145
self.apiclient,
142146
systemvmtype='secondarystoragevm',
@@ -154,10 +158,12 @@ def test_01_sys_vm_start(self):
154158
"Check list System VMs response"
155159
)
156160

157-
for ssvm in list_ssvm_response:
158-
if ssvm.state != 'Running':
159-
time.sleep(30)
160-
continue
161+
if all(ssvm.state == 'Running' for ssvm in list_ssvm_response):
162+
break
163+
164+
time.sleep(interval)
165+
timeout -= interval
166+
161167
for ssvm in list_ssvm_response:
162168
self.assertEqual(
163169
ssvm.state,

0 commit comments

Comments
 (0)