-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix VMScheduler unit test for daylight saving time #11907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VMScheduler unit test for daylight saving time #11907
Conversation
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm, tested the code locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
|
Pearl1594
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
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?