incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [12/50] [abbrv] git commit: refs/heads/master - test_vm_life_cycle: Don't wait a lot poll for change every expunge_cycle interval
Date Fri, 01 Feb 2013 23:27:31 GMT
test_vm_life_cycle: Don't wait a lot poll for change every expunge_cycle interval

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>


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

Branch: refs/heads/master
Commit: a4c778e115471b23b42c8033be0fb4ade6a3dbb7
Parents: 1450547
Author: Rohit Yadav <bhaisaab@apache.org>
Authored: Fri Jan 25 19:12:53 2013 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Fri Jan 25 23:40:01 2013 -0800

----------------------------------------------------------------------
 test/integration/smoke/test_vm_life_cycle.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a4c778e1/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index 7ee9a03..3596ca2 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -869,11 +869,18 @@ class TestVMLifeCycle(cloudstackTestCase):
         if expunge_cycle < 600:
             expunge_cycle = 600
 
-        time.sleep(expunge_cycle * 2)
-        list_vm_response = list_virtual_machines(
+        wait_time = expunge_cycle * 2
+        while wait_time >= 0:
+            list_vm_response = list_virtual_machines(
                                                 self.apiclient,
                                                 id=self.small_virtual_machine.id
                                                 )
+            if list_vm_response:
+                time.sleep(expunge_cycle)
+                wait_time = wait_time - expunge_cycle
+            else:
+                break
+
         self.assertEqual(
                         list_vm_response,
                         None,


Mime
View raw message