From 3efe053952cee3ab878b0ab0c87af3bad2e5df4e Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Fri, 19 Jun 2015 21:46:40 +0200 Subject: [PATCH] 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 This closes #493 --- test/integration/smoke/test_secondary_storage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/smoke/test_secondary_storage.py b/test/integration/smoke/test_secondary_storage.py index 436e5a31fea..082c023c39f 100644 --- a/test/integration/smoke/test_secondary_storage.py +++ b/test/integration/smoke/test_secondary_storage.py @@ -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"