Skip to content

Conversation

trholdridge
Copy link
Contributor

Ticket: https://broadworkbench.atlassian.net/browse/CORE-134

Previously, if the local timezone had an offset change in the next 30 days, certain tests would fail. I didn't figure out the full root cause, but it probably has to do with parts of the actual implementation using seconds (NihLink(eraCommonsUsername, iat + 60 * 60 * 24 * 30)) and the tests using days. Changing just minusDays to minusSeconds made it work, but I converted the plusDays as well for good measure.

The tests always passed in GH actions, so to replicate the problem and verify the solution (only within 30 days of a time changeover!):

git checkout 1646e20daaeca31c11e40fcc59e49986aa8833b;
TZ="America/New_York" sbt "testOnly *NihServiceUnitSpec";
git checkout 1e297af8e4fdc5b85f4faecab4f57fa43c1bdd81;
TZ="America/New_York" sbt "testOnly *NihServiceUnitSpec";

https://xkcd.com/2867/

@trholdridge trholdridge requested review from a team, calypsomatic and davidangb and removed request for a team October 31, 2024 15:26
Copy link
Contributor

@calypsomatic calypsomatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense!

Copy link
Contributor

@davidangb davidangb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thank you!

@trholdridge trholdridge merged commit 23bdd75 into develop Oct 31, 2024
14 checks passed
@trholdridge trholdridge deleted the CORE-134 branch October 31, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants