-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Fix printers tests - remove dependency on leap years #123910
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
Conversation
Hi @MarSik. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
Test that were using AddDate(+y, 0, 0) and then time.Sub were sensitive to a specific date of their execution. An example is a test with AddDate(-5, 0, 0) when executed on 28th of February 2024 and when executed on 1st of March 2024. The difference seen by Sub will be 5y1d in the first case and 5y2d in the second case, because 29th of Feb 2024 is a leap year as well as 29th of Feb 2020 that falls within the 5 year difference. Signed-off-by: Martin Sivak <msivak@redhat.com>
9f6b2e7
to
5ba8f88
Compare
the fix looks legit, but which test is failing or flaking? |
It seems to me the issue is fixedby #123603 . This is a further improvement over that it seems? |
Yeah, I missed the initial patch and git resolved the conflicts for me. #123603 did not actually explain what happened either, but well... |
/triage accepted thanks, labelling as test improvement so |
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
Thanks for the PR!
LGTM label has been added. Git tree hash: 4b4064fb826549ffa7f42ddbac02c9fac8dd9a8f
|
/assign @smarterclayton @soltysh |
/kind cleanup |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, MarSik, swatisehgal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
/kind failing-test
What this PR does / why we need it:
Test that were using AddDate(+y, 0, 0) and then time.Sub were sensitive to a specific date of their execution.
An example is a test with AddDate(-5, 0, 0) when executed on 28th of February 2024 and when executed on 1st of March 2024.
The difference seen by Sub will be 5y1d in the first case and 5y2d in the second case, because 29th of Feb 2024 is a leap year as well as 29th of Feb 2020 that falls within the 5 year difference.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: