-
Notifications
You must be signed in to change notification settings - Fork 527
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 #5430: Fix flakes in NetworkLoggingInterceptorTest #5436
Fix #5430: Fix flakes in NetworkLoggingInterceptorTest #5436
Conversation
This also fixes theoretical flakes in ConsoleLoggerTest.
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.
Self-reviewed the fixes.
@adhiamboperes PTAL for codeowners. I'm also enabling auto-merge since I hope this isn't a change that requires a lot of iteration (though if you have thoughts, please do let me know). |
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 16 MiB (new), 0 bytes (No change) APK download size (estimated): 14 MiB (old), 14 MiB (new), 1 bytes (Removed) Method count: 221791 (old), 221791 (new), 0 (No change) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6550 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 15 MiB (new), 0 bytes (No change) Configuration hdpiAPK file size: 59 KiB (old), 59 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 56 KiB (old), 56 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 53 KiB (old), 53 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 102 KiB (old), 102 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 67 KiB (old), 67 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 76 KiB (old), 76 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 79 KiB (old), 79 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 10 MiB (new), 0 bytes (No change) APK download size (estimated): 9150 KiB (old), 9150 KiB (new), 9 bytes (Added) Method count: 99436 (old), 99436 (new), 0 (No change) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 0 bytes (No change) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 4 bytes (Removed) APK download size (estimated): 9135 KiB (old), 9135 KiB (new), 12 bytes (Added) Method count: 99436 (old), 99436 (new), 0 (No change) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 8 bytes (Removed) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 9 MiB (new), 4 bytes (Removed) APK download size (estimated): 9136 KiB (old), 9136 KiB (new), 16 bytes (Added) Method count: 99436 (old), 99436 (new), 0 (No change) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5504 (new), 0 (No change)
Lesson assets: 105 (old), 105 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 9 MiB (new), 0 bytes (No change) Configuration hdpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 52 KiB (old), 52 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 90 KiB (old), 90 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 60 KiB (old), 60 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 69 KiB (old), 69 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 71 KiB (old), 71 KiB (new), 0 bytes (No change) |
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.
This LGTM, thanks for investigating!
Explanation
Fixes #5430
Fix flaky tests in
NetworkLoggingInterceptorTest
and (theoretically) inConsoleLoggerTest
.See #5430 for investigation methodology and findings. Ultimately, the problem was that tests were trying to observed
SharedFlow
results after changes to that flow may have been emitted (which means there's no guarantees by the flow that the value is present upon trying to consume it, hence the flake in the job consuming the flow not completing).Note that
ConsoleLoggerTest
's fix is only theoretical since, having only one test, it doesn't seem to ever produce the correct situations that would cause the flake.Originally,
NetworkLoggingInterceptorTest
would flake with almost a 20% failure rate. I've verified that the test passes without failures over 1000x runs:Similarly, I've also checked the change in
ConsoleLoggerTest
just to ensure nothing's changed:Essential Checklist
For UI-specific PRs only
This PR only affects the behavior of two test suites; no end user UX or UIs are affected by these changes.