Test would also throw success if vm was still 'Starting' after 1 minute, this resolves that Reduced for loop to two runs as it will make those many calls to the API if state was Running to start with

Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #493
This commit is contained in:
Rafael da Fonseca 2015-06-19 21:46:40 +02:00 committed by Daan Hoogland
parent 480cd4693f
commit 3efe053952

View File

@ -134,7 +134,7 @@ class TestSecStorageServices(cloudstackTestCase):
'Up',
"Check state of primary storage pools is Up or not"
)
for _ in range(4):
for _ in range(2):
list_ssvm_response = list_ssvms(
self.apiclient,
systemvmtype='secondarystoragevm',
@ -154,10 +154,10 @@ class TestSecStorageServices(cloudstackTestCase):
for ssvm in list_ssvm_response:
if ssvm.state == 'Starting':
time.sleep(15)
time.sleep(30)
continue
for ssvm in list_ssvm_response:
self.assertEqual(
for ssvm in list_ssvm_response:
self.assertEqual(
ssvm.state,
'Running',
"Check whether state of SSVM is running"