Allow some time for the SSVM to start before throwing a failure

Signed-off-by: Daan Hoogland <daan@onecht.net>
This commit is contained in:
Rafael da Fonseca 2015-06-19 21:06:51 +02:00 committed by Daan Hoogland
parent 6e068551d6
commit 480cd4693f

View File

@ -134,30 +134,35 @@ class TestSecStorageServices(cloudstackTestCase):
'Up',
"Check state of primary storage pools is Up or not"
)
list_ssvm_response = list_ssvms(
for _ in range(4):
list_ssvm_response = list_ssvms(
self.apiclient,
systemvmtype='secondarystoragevm',
)
self.assertEqual(
self.assertEqual(
isinstance(list_ssvm_response, list),
True,
"Check list response returns a valid list"
)
#Verify SSVM response
self.assertNotEqual(
#Verify SSVM response
self.assertNotEqual(
len(list_ssvm_response),
0,
"Check list System VMs response"
)
for ssvm in list_ssvm_response:
self.assertEqual(
for ssvm in list_ssvm_response:
if ssvm.state == 'Starting':
time.sleep(15)
continue
for ssvm in list_ssvm_response:
self.assertEqual(
ssvm.state,
'Running',
"Check whether state of SSVM is running"
)
return
@attr(tags = ["advanced", "advancedns", "smoke", "basic", "eip", "sg"], required_hardware="false")