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

Update datetime equality checks to use an absolute tolerance #2356

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saitcakmak
Copy link
Contributor

Summary: Previously, this would set microseconds to 0, effectively comparing that the events happened in the same second. If the seconds differed, even when the absolute difference was negligible, the checks would fail making some tests flaky. Updating the logic to rely on an absolute difference instead, with a default tolerance of 1e-2 seconds (which is sufficient to have existing, occassionally flaky tests pass).

Differential Revision: D56077050

Summary: Previously, this would set microseconds to 0, effectively comparing that the events happened in the same second. If the seconds differed, even when the absolute difference was negligible, the checks would fail making some tests flaky. Updating the logic to rely on an absolute difference instead, with a default tolerance of 1e-2 seconds (which is sufficient to have existing, occassionally flaky tests pass).

Differential Revision: D56077050
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D56077050

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants