Repository navigation
Conversation
The smoke tests replace the default uncaught exception handler with one that only records the exception. If the main thread throws, the app hangs instead of crashing and the test may never reach assertNoUncaughtExceptions(), so the exception was lost. Log it under the DemoSmokeTest tag as well. Also note in AGENTS.md to keep the screen on when running the emulator suites on a physical device: a screen timeout in the middle of a run made the demo app hang with an ANR (#1070).
Coverage (unit tests)Compared against
Line and branch coverage from unit test reports. History is recorded on the |
Contributor
Coverage (instrumentation tests)
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up of #1070.
DemoAppSmokeTestandDemoMenuNavigationTestreplace the default uncaught exception handler with one that only records the exception, so it can be asserted at the end. If the main thread throws, though, the app does not crash: the main thread just stops, the test hangs waiting for it and never reachesassertNoUncaughtExceptions(), and the exception is lost.Log.eunder theDemoSmokeTesttag, with the thread name. Behaviour of the tests does not change.adb shell svc power stayon usb), since a screen timeout in the middle of a run made the demo app hang with an ANR on a Pixel 4, and to check logcat for theDemoSmokeTesttag if a run hangs.Testing
DemoAppSmokeTestwithrequireMapLoaded=trueon a Pixel 4 (Android 13) with the screen kept on: 44 of 44 pass, nothing logged by the handler.maps-appinstrumentation tests compile andspotlessKotlinCheckpasses.Closes #1070