From 50ab04dc0d73c0192c0693d62c047cfaffc73e99 Mon Sep 17 00:00:00 2001 From: Ashutosh K Date: Thu, 20 Nov 2014 16:43:09 +0530 Subject: [PATCH] CLOUDSTACK-7953: Fixed time wait period for verifying snapshot policy Signed-off-by: SrikanteswaraRao Talluri --- .../component/test_snapshot_limits.py | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/test/integration/component/test_snapshot_limits.py b/test/integration/component/test_snapshot_limits.py index 18a1c658c7a..40849ee4622 100644 --- a/test/integration/component/test_snapshot_limits.py +++ b/test/integration/component/test_snapshot_limits.py @@ -16,13 +16,21 @@ # under the License. from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +#from marvin.cloudstackAPI import * +from marvin.lib.utils import cleanup_resources +from marvin.lib.base import (Account, + VirtualMachine, + SnapshotPolicy, + ServiceOffering) +from marvin.lib.common import (get_zone, + get_template, + get_domain, + list_volumes, + list_snapshots, + list_snapshot_policy) from marvin.lib.utils import is_snapshot_on_nfs -import os +import time class Services: @@ -262,7 +270,7 @@ class TestSnapshotLimit(cloudstackTestCase): # Sleep for (maxsnaps+1) hours to verify # only maxsnaps snapshots are retained time.sleep( - (self.services["recurring_snapshot"]["maxsnaps"]) * 3600 + (int(self.services["recurring_snapshot"]["maxsnaps"]) + 1) * 3600 ) # Verify the snapshot was created or not