Skip to content
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

Test info::repo::tests::display_time_as_human_time_current_time_arbitrary can fail #612

Closed
spenserblack opened this issue Mar 14, 2022 · 1 comment · Fixed by #613
Closed
Labels
bug Something isn't working

Comments

@spenserblack
Copy link
Collaborator

Running cargo test, it seems like this test can fail, at least on my machine. It returns "2 years ago" instead of the expected "a year ago". I ran a bisect to make sure that there were no changes causing this test to fail, and bisect selected 3d7b14b

@spenserblack spenserblack added the bug Something isn't working label Mar 14, 2022
@spenserblack spenserblack changed the title Test test info::repo::tests::display_time_as_human_time_current_time_arbitrary can fail Test info::repo::tests::display_time_as_human_time_current_time_arbitrary can fail Mar 14, 2022
@spenserblack
Copy link
Collaborator Author

I think the issue is that time is set to 1600000000, instead of being relative to the current time.

@o2sh o2sh closed this as completed in #613 Mar 14, 2022
o2sh pushed a commit that referenced this issue Mar 14, 2022
This test was failing after a year, because it was testing a conversion
of 2020/09/13 to "a year ago." This changes the test to be relative to
the current time, and subtract roughly a year.

Fixes #612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant