Add strict mode ignore rule for wrong context usage for WV debug#6877
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the instrumentation test setup so FailFast is configured early enough (before Application.onCreate) to avoid the default debug handler terminating the process during startup, improving integration test failure reporting.
Changes:
- Added a custom
AndroidJUnitRunnerin:appand:wearandroidTest sources that installs a testFailFastHandlerduring runneronCreate - Configured
testInstrumentationRunnerfor:appand:wearto use the new runner - Removed the per-test
FailFastoverride rule fromLaunchActivityTestsince runner-level setup now covers startup timing
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| wear/src/androidTest/kotlin/io/homeassistant/companion/android/util/HAAndroidJUnitRunner.kt | Adds a custom instrumentation runner that sets a test FailFastHandler before app creation |
| wear/build.gradle.kts | Switches Wear instrumentation runner to the new custom runner |
| app/src/androidTest/kotlin/io/homeassistant/companion/android/util/HAAndroidJUnitRunner.kt | Adds a custom instrumentation runner that sets a test FailFastHandler before app creation |
| app/src/androidTest/kotlin/io/homeassistant/companion/android/launch/LaunchActivityTest.kt | Removes the per-test FailFast rule now made redundant by the runner-level handler |
| app/build.gradle.kts | Switches App instrumentation runner to the new custom runner |
Member
|
I think you accidentally included this in #6875 - only the strict mode rule is new here. Good to merge IMO after a rebase and rename. |
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
We found out a Strict Mode issue while calling the WebView debug flag using a non UI context while running the test on Emulator.wtf this PR add an Ignore rule there.
You can see the issue https://emulator.wtf/o/a09ee3e1-05c8-4736-8790-c62326837a36/r/30b31c99-a72a-4904-b9f8-f52317c69209/j/79fc70b1-de09-429c-aadf-93bf2f0967a1?key=moYsRl9GO8Lttjtg6pebEDSjL89-Ne4USvXbmK4L