-
Notifications
You must be signed in to change notification settings - Fork 165
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
Use UNITTEST_LOG_LEVEL in objectstore tests #7029
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build github_pull_request_278228
💛 - Coveralls |
For historical reasons core and sync tests use the UNITTEST_LOG_LEVEL environment variable to determine the test log level, while object store tests used a build time setting. This brings them into alignment on using the env variable, and applies it via setting the default log level on startup in a single place.
181edea
to
16c08e4
Compare
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.
Looks good - definitely cleans up the setting of the log level for the tests
if (auto custom_level = Logger::level_from_string(str)) { | ||
log_level = *custom_level; | ||
} |
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.
What about writing the value of UNITTEST_LOG_LEVEL to stderr here, like we did in the makefile, or print an error (with the UNITTEST_LOG_LEVEL) if the value is invalid. Regardless, don't return exit the test on an invalid value.
Turns out this is setting the log level for a bit too many things and by default failing checks aren't getting reported. Will need to poke at it a bit more. |
Yeah - IIRC, I think the default logger level was (or at least used to be) "info" and the |
For historical reasons core and sync tests use the UNITTEST_LOG_LEVEL environment variable to determine the test log level, while object store tests used a build time setting. This brings them into alignment on using the env variable, and applies it via setting the default log level on startup in a single place.
The default behavior and log level used on CI should be unchanged.