android-maps-compose icon indicating copy to clipboard operation
android-maps-compose copied to clipboard

Fix flaky tests on CI

Open arriolac opened this issue 1 year ago • 2 comments

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)

arriolac avatar Jul 12 '22 18:07 arriolac

Looks like there are 2 causes for the failed actions linked in the description:

  1. 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
  2. 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.

arriolac avatar Jul 12 '22 20:07 arriolac

I tried running locally on this emulator and the tests still pass:

image

barbeau avatar Jul 12 '22 20:07 barbeau

Tests cannot pass on PRs from forks. Root cause: https://github.com/community/community/discussions/50161

wangela avatar Mar 15 '23 19:03 wangela

:tada: This issue has been resolved in version 2.11.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

googlemaps-bot avatar Mar 29 '23 23:03 googlemaps-bot