File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments