Skip to content

Change integration test log level to "debug" #211

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

Merged
merged 2 commits into from
Dec 15, 2020

Conversation

anonymous-akorn
Copy link
Contributor

Currently the logging behaviour for "debug" level logs is set to show them at the end of the integration test, if there were any failures. If the integration test prematurely ends (crash, failed assertion, or timeout), this results in them not showing up at all. In practice, this often leads to a lack of relevant logs to understand why a test didn't complete.

To fix this, the overall log level is changed from info to debug. This ensures debug logs are logged immediately, so a prematurely ended test won't prevent them from appearing.

This includes a fix to the desktop_tester script to capture logs in the event of a process timeout: previously, result.stdout was used, which doesn't get populated if the process timed out (resulting in missing logs). Instead, we access output from the error. Experimentation revealed that this output will sometimes be text, and sometimes binary: it's unclear what's responsible for this difference (possibly the encoding settings of the environment running the script). Thus we try to decode the binary, and store it as-is if it's already text.

Currently the logging behaviour for "debug" level logs is set to show them at the end of the integration test, if there were any failures. This results in them not showing up at all, should the integration test prematurely exit to due a crash, failed assertion, or timeout. In practice, this often leads to a lack of relevant logs to understand why a test didn't complete.

To fix this, the overall log level is changed from info to debug. This ensures debug logs are logged immediately, so a prematurely ended test won't prevent them from showing up.

This also includes a small fix to the desktop_tester script to capture logs in the event of a process timeout: previously, result.stdout was used, which doesn't get populated if the process timed out. Instead, we access output from the error. Experimentation revealed that this output will sometimes be test, and sometimes binary: it's unclear what's responsible for this difference (possibly the encoding settings of the environment running the script). Thus we try to decode, and store it as-is if that fails.
Copy link
Contributor

@vimanyu vimanyu left a comment

Choose a reason for hiding this comment

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

LGTM

@anonymous-akorn anonymous-akorn merged commit 5b2a57a into dev Dec 15, 2020
@anonymous-akorn anonymous-akorn deleted the feature/aks-gtest-logging branch December 15, 2020 16:48
@firebase firebase locked and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants