-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Bug]: navigationBar_multipleBackStackInterests might be flaky #1021
Comments
I'm not able to reproduce this flakiness on an emulator with the same API level. |
I tried a quick fix here because it was making working on that PR very difficult. |
@JoseAlcerreca Can you/I extract your fix in a dedicated PR and try to merge it and see if it fixes the issue? |
Merged in #1019 |
I did some investigation into this today. The flaky test navigates to 4 screens and performs a scroll. It takes ~10s to run on CI. The reason why it doesn't fail locally is because your local machine is likely much more powerful than the CI machine so the emulator responds faster. On my M1 this test took about 7 seconds. The reason for the 10s timeout is given by Jake Wharton here: Kotlin/kotlinx.coroutines#3270 with a big follow up discussion about the issues it causes here: Kotlin/kotlinx.coroutines#3800. |
@JoseAlcerreca's fix works because it moves the test execution out of the 10 seconds is a really long time for a test so this should be treated as an anomaly. Possible solutions:
Any other ideas or thoughts? |
Good catch!
This will indeed restore the default behavior of whatever the code does, which for instrumented tests is generally driven by espresso "idling" mechanism and uses a 60s timeout. For Compose API, there should probably be the same, but I don't find any reference.
This might not really improve the situation, if it is left to choose by the dev, because most of the devs will have a more performant machine than what GitHub Actions offers for free. And everything would look fine on their end, they probably won't add a custom timeout, but then it will continue to fail sometimes on CI.
This would be very neat, but I think these are only meant for test selection/groupping with the JUnit framework. Maybe a custom test runner could help with detecting that, but this would be way more involving. My personal opinion on this would be to:
|
Good points. |
Is there an existing issue for this?
Is there a StackOverflow question about this issue?
What happened?
navigationBar_multipleBackStackInterests might be flaky. It tends to fail in API 30.
Example failure:
https://github.com/android/nowinandroid/actions/runs/6774060182/job/18410826425
Related: #1011
Relevant logcat output
Code of Conduct
The text was updated successfully, but these errors were encountered: