Skip to content

Commit 138cee4

Browse files
Gaurav AradhyeGirish Shilamkar
authored andcommitted
CLOUDSTACK-5201: Correcting code related to schedule of
recurring snapshot policy
1 parent db2ea0a commit 138cee4

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

test/integration/component/test_base_image_updation.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -534,14 +534,8 @@ def test_04_reoccuring_snapshot_rules(self):
534534
vm_with_reset.rootdeviceid
535535
)
536536

537-
now = datetime.now()
538-
delta = timedelta(minutes=15)
539-
scheduled_time = now + delta
540-
541-
self.services["recurring_snapshot"]["schedule"] = scheduled_time.minute
542-
543537
self.debug("Creating recurring snapshot policy for root disk on vm created with IsVolatile=True")
544-
self.debug("Snapshot Policy - Type : %s Scheduled minute : %s" %(
538+
self.debug("Snapshot Policy - Type : %s Scheduled Hours : %s" %(
545539
self.services["recurring_snapshot"]["intervaltype"],
546540
self.services["recurring_snapshot"]["schedule"]))
547541

@@ -575,7 +569,7 @@ def test_04_reoccuring_snapshot_rules(self):
575569
self.services["recurring_snapshot"]["maxsnaps"],
576570
"Check interval type in list resources call"
577571
)
578-
sleep_seconds = delta.seconds + 600
572+
sleep_seconds = (self.services["recurring_snapshot"]["schedule"]) * 3600 + 600
579573
sleep_minutes = sleep_seconds/60
580574
self.debug("Sleeping for %s minutes till the volume is snapshoted" %sleep_minutes)
581575
time.sleep(sleep_seconds)

0 commit comments

Comments
 (0)