Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84C58EEDC for ; Fri, 1 Feb 2013 23:27:43 +0000 (UTC) Received: (qmail 69771 invoked by uid 500); 1 Feb 2013 23:27:33 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 69376 invoked by uid 500); 1 Feb 2013 23:27:33 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 68798 invoked by uid 99); 1 Feb 2013 23:27:32 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 23:27:32 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ED2F882916F; Fri, 1 Feb 2013 23:27:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kelveny@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer 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 Message-Id: <20130201232731.ED2F882916F@tyr.zones.apache.org> Date: Fri, 1 Feb 2013 23:27:31 +0000 (UTC) test_vm_life_cycle: Don't wait a lot poll for change every expunge_cycle interval Signed-off-by: Rohit Yadav 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 Authored: Fri Jan 25 19:12:53 2013 -0800 Committer: Rohit Yadav 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,