Fix VMScheduler unit test for daylight saving time (#11907)

This commit is contained in:
Suresh Kumar Anaparti 2025-10-24 19:38:32 +05:30 committed by GitHub
parent e333ce9782
commit 255c4615dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -238,7 +238,7 @@ public class VMSchedulerImplTest {
Date expectedScheduledTime = Date.from(zonedDateTime.toInstant());
if (expectedScheduledTime.before(startDate)) {
expectedScheduledTime = DateUtils.addDays(expectedScheduledTime, 1);
expectedScheduledTime = Date.from(zonedDateTime.plusDays(1).toInstant());
}
Date actualScheduledTime = vmScheduler.scheduleNextJob(vmSchedule, new Date());