You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/06/19 23:40:42 UTC

[2/2] git commit: updated refs/heads/master to 3efe053

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

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


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/480cd469
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/480cd469
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/480cd469

Branch: refs/heads/master
Commit: 480cd4693fcb9969629e25a9dbe95da45a6ce1ab
Parents: 6e06855
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Fri Jun 19 21:06:51 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Fri Jun 19 23:40:31 2015 +0200

----------------------------------------------------------------------
 test/integration/smoke/test_secondary_storage.py | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/480cd469/test/integration/smoke/test_secondary_storage.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_secondary_storage.py b/test/integration/smoke/test_secondary_storage.py
index 1a24239..436e5a3 100644
--- a/test/integration/smoke/test_secondary_storage.py
+++ b/test/integration/smoke/test_secondary_storage.py
@@ -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")