Repository navigation
test: wait for clustered markers instead of map load in clustering tests - #1020
Merged
Merged
Conversation
initMapAndGetMarker waited for onMapLoaded, which also waits for every tile to render, before polling for the clustered marker. On the CI emulator tiles sometimes take longer than the timeout, so testClusteringMarkerPropertiesRotationUpdatesMarker failed intermittently. Poll for the marker directly with the same overall timeout.
Coverage (unit tests)No unit baseline recorded in
Line and branch coverage from unit test reports. History is recorded in |
Contributor
Code Coverage
|
kikoso
marked this pull request as ready for review
October 1, 2026 12:41
dkhawk
approved these changes
Oct 1, 2026
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.
Problem
GoogleMapViewClusteringTests.testClusteringMarkerPropertiesRotationUpdatesMarkerfails intermittently inRun instrumentation testsatassertThat(mapLoaded).isTrue()(line 78). It failed on #1019 today and on #1002 on Sep 30, passing on re-run, while the other 40 tests passed.initMapAndGetMarkerwaits foronMapLoadedbefore polling for the clustered marker.onMapLoadedalso waits for every tile to render, which on the macOS API 29 CI emulator sometimes takes longer thanMAP_LOAD_TIMEOUT_SECONDS.Fix
The tests only need the clustered marker, which the cluster manager adds once the map is ready, so
initMapAndGetMarkernow polls for the marker directly, with the same overall timeout (MAP_LOAD_TIMEOUT_SECONDS, previously 10 seconds for this poll after up to 30 for the map). The three tests in the class use this helper; their assertions are unchanged.Testing
On a local API 34 emulator with a real key,
GoogleMapViewClusteringTestspassed 5 runs in a row (15/15).