android-maps-compose
android-maps-compose copied to clipboard
Fix flaky tests on CI
Steps to reproduce
Run the test workflow on main
and notice that instrumentation tests are failing. Example failed runs:
https://github.com/googlemaps/android-maps-compose/runs/7306842111 https://github.com/googlemaps/android-maps-compose/runs/7283340731
Also see discussion in #171
Code example
N/A
Stack trace
com.google.maps.android.compose.MapInColumnTests > testScrollColumn_MapCameraRemainsSame[test(AVD) - 10] FAILED
java.lang.AssertionError: Assert failed: The component is displayed!
at androidx.compose.ui.test.AssertionsKt.assertIsNotDisplayed(Assertions.kt:51)
Looks like there are 2 causes for the failed actions linked in the description:
- Failure due to secrets not being available on forks. This is the reason for the failed PR in https://github.com/googlemaps/android-maps-compose/runs/7283340731. This should be addressed by #175
- Failure in
MapInColumnTests.testScrollColumn_MapCameraRemainsSame
. This appears to be env specific as running it locally passes. Perhaps running the test on the same emulator might give us some hints on what might be causing the test failure.
I tried running locally on this emulator and the tests still pass:
Tests cannot pass on PRs from forks. Root cause: https://github.com/community/community/discussions/50161
:tada: This issue has been resolved in version 2.11.4 :tada:
The release is available on:
-
v2.11.4
- GitHub release
Your semantic-release bot :package::rocket: