Ignore JobService leak in InstrumentationTest for API23#6765
Conversation
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the LaunchActivity instrumentation test on API 23 by treating a known WorkManager SystemJobService/JobService$1 retention as a library leak, preventing LeakCanary from failing the test on that SDK level.
Changes:
- Wrap the existing Compose instrumentation rule in a
RuleChainalongside LeakCanary leak detection. - Temporarily adjust
LeakCanary.config.referenceMatchersduring the test to ignore the API 23android.app.job.JobService$1native-global leak pattern.
|
This very specifically says it's only on API 23, but that is just our test or did you test with multiple API versions to narrow it down? If not the comment should be updated to make that clear. |
I didn't test yet on other emulator. I might do that next week if I have time to setup emulator.wtf to try all the APIs we target. This PR is mostly to unlock the situation, I would say that it is not happening on API 33 with the automotive test we run. |
…launch/LaunchActivityTest.kt Co-authored-by: Joris Pelgröm <[email protected]>
Summary
After #6720 we started to see failure on the CI while running the dumb InstrumentationTest on
LaunchActivityon API23I don't think we can do much about it so I decided to ignore it when running on API 23.