Fix VMScheduler unit test for daylight saving time#11907
Conversation
DaanHoogland
left a comment
There was a problem hiding this comment.
clgtm, tested the code locally
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a daylight saving time (DST) issue in the VMScheduler unit test by replacing date arithmetic that could be affected by DST transitions with timezone-aware date calculations.
Key Changes:
- Replaced
DateUtils.addDays()withZonedDateTime.plusDays()to ensure DST-safe date arithmetic
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11907 +/- ##
=========================================
Coverage 16.18% 16.18%
- Complexity 13302 13306 +4
=========================================
Files 5657 5657
Lines 498464 498464
Branches 60491 60491
=========================================
+ Hits 80674 80696 +22
+ Misses 408810 408787 -23
- Partials 8980 8981 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
build passes and only a unit test => merging |
Description
This PR fixes VMScheduler unit test for daylight saving time.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Manually verified the unit test.
How did you try to break this feature and the system with this change?