File tree Expand file tree Collapse file tree
test/integration/component Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -350,16 +350,31 @@ def test_02_NetworkGarbageCollection(self):
350350 "Check list router response"
351351 )
352352 # Router associated with account should be in running state
353- for router in routers :
354- self .debug ("Router ID: %s & Router state: %s" % (
353+ timeout = 180
354+ router = routers [0 ]
355+ self .debug ("Router ID: %s & Router state: %s" % (
355356 router .id ,
356357 router .state
357358 ))
358- self .assertEqual (
359+ self .debug ("Wait for %s secs max for router to reach Running state" % timeout )
360+ while timeout :
361+ time .sleep (60 )
362+ routers = list_routers (
363+ self .apiclient ,
364+ account = self .account .name ,
365+ domainid = self .account .domainid ,
366+ id = router .id )
367+ router = routers [0 ]
368+ if router .state == 'Running' :
369+ break
370+
371+ timeout = timeout - 60
372+ if timeout == 0 :
373+ self .assertEqual (
359374 router .state ,
360375 'Running' ,
361- "Check list router response for router state"
362- )
376+ "Router not in Running state" )
377+
363378
364379 # Network state associated with account should be 'Implemented'
365380 networks = list_networks (
You can’t perform that action at this time.
0 commit comments