From 138cee401ff6973a43302da2ba323b7e85321a19 Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Thu, 21 Nov 2013 11:15:32 +0530 Subject: [PATCH] CLOUDSTACK-5201: Correcting code related to schedule of recurring snapshot policy --- test/integration/component/test_base_image_updation.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py index b70bea5b546..762016f972c 100644 --- a/test/integration/component/test_base_image_updation.py +++ b/test/integration/component/test_base_image_updation.py @@ -534,14 +534,8 @@ class TestBaseImageUpdate(cloudstackTestCase): vm_with_reset.rootdeviceid ) - now = datetime.now() - delta = timedelta(minutes=15) - scheduled_time = now + delta - - self.services["recurring_snapshot"]["schedule"] = scheduled_time.minute - self.debug("Creating recurring snapshot policy for root disk on vm created with IsVolatile=True") - self.debug("Snapshot Policy - Type : %s Scheduled minute : %s" %( + self.debug("Snapshot Policy - Type : %s Scheduled Hours : %s" %( self.services["recurring_snapshot"]["intervaltype"], self.services["recurring_snapshot"]["schedule"])) @@ -575,7 +569,7 @@ class TestBaseImageUpdate(cloudstackTestCase): self.services["recurring_snapshot"]["maxsnaps"], "Check interval type in list resources call" ) - sleep_seconds = delta.seconds + 600 + sleep_seconds = (self.services["recurring_snapshot"]["schedule"]) * 3600 + 600 sleep_minutes = sleep_seconds/60 self.debug("Sleeping for %s minutes till the volume is snapshoted" %sleep_minutes) time.sleep(sleep_seconds)