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

Fix flaky LoggerTests.test_logger_log_status #6171

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

Smjert
Copy link
Member

@Smjert Smjert commented Jan 14, 2020

Logging happens after getting the current time,
so the time check should be inverted.

Example of a failure:

10: [ RUN      ] LoggerTests.test_logger_log_status
10: W0113 11:10:15.003626 58741 logger.cpp:186] Logger test is generating a warning status (2)
10: /__w/1/s/usr/src/debug/osquery/osquery/logger/tests/logger.cpp:194: Failure
10: Expected: (now) >= (LoggerTests::last_status.time), actual: 1578913814 vs 1578913815
10: [  FAILED  ] LoggerTests.test_logger_log_status (0 ms)

Logging happens after getting the current time,
so the time check should be inverted.
@theopolis theopolis merged commit 86cd9ec into osquery:master Jan 16, 2020
@Smjert Smjert deleted the stefano/test/flaky-logger branch January 18, 2020 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants