CLOUDSTACK-7953: Fixed time wait period for verifying snapshot policy Signed-off-by: SrikanteswaraRao Talluri <tall...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/50ab04dc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/50ab04dc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/50ab04dc Branch: refs/heads/useraccount-refactoring Commit: 50ab04dc0d73c0192c0693d62c047cfaffc73e99 Parents: 1db2d14 Author: Ashutosh K <ashut...@clogeny.com> Authored: Thu Nov 20 16:43:09 2014 +0530 Committer: SrikanteswaraRao Talluri <tall...@apache.org> Committed: Tue Nov 25 18:39:43 2014 +0530 ---------------------------------------------------------------------- .../component/test_snapshot_limits.py | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/50ab04dc/test/integration/component/test_snapshot_limits.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_snapshot_limits.py b/test/integration/component/test_snapshot_limits.py index 18a1c65..40849ee 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