Skip to content

test(clustering): verify coroutine context injection with Android Maps Testing Toolkit - #1825

Open
dkhawk wants to merge 1 commit into
mainfrom
test/cluster-manager-robolectric-shadows
Open

dkhawk wants to merge 1 commit into
mainfrom
test/cluster-manager-robolectric-shadows

Conversation

@dkhawk

@dkhawk dkhawk commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Overview

This PR adds unit and integration tests for coroutine context injection in ClusterManager (introduced in #1822) using the Android Maps Testing Toolkit (com.google.maps.android:maps-testing-robolectric):

  • Stateful Map Lifecycle: Mounts a real MapView and extracts ShadowGoogleMap to test clustering behavior against an actual map instance headlessly.
  • Coroutine Dispatcher Verification: Verifies that clustering computations run strictly on backgroundDispatcher and UI cluster updates are delivered on mainDispatcher by asserting map markers before and after advancing TestCoroutineScheduler.
  • Cancellation & Stress Testing: Exercises rapid successive cluster() invocations to confirm that in-flight coroutines are cleanly cancelled without leaking or crashing.

@dkhawk
dkhawk requested a review from kikoso October 19, 2026 21:09
Base automatically changed from feat/cluster-manager-dispatchers to main October 20, 2026 17:18
@dkhawk
dkhawk force-pushed the test/cluster-manager-robolectric-shadows branch from 481cc34 to 5a3046c Compare October 21, 2026 16:00
@dkhawk
dkhawk force-pushed the test/cluster-manager-robolectric-shadows branch from 5a3046c to 1edeb1d Compare November 5, 2026 23:44
@dkhawk dkhawk changed the title [HOLD] test(clustering): verify coroutine context injection with android-maps-robolectric test(clustering): verify coroutine context injection with Android Maps Testing Toolkit Nov 10, 2026
@dkhawk
dkhawk force-pushed the test/cluster-manager-robolectric-shadows branch 2 times, most recently from a415d75 to 3d4797c Compare November 10, 2026 23:47
@dkhawk
dkhawk force-pushed the test/cluster-manager-robolectric-shadows branch from 3d4797c to bcbf4ae Compare November 11, 2026 00:15
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 65.43% 🍏

There is no coverage information present for the Files changed

@dkhawk
dkhawk marked this pull request as ready for review November 13, 2026 21:41

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants