Repository navigation
Tags
Tags
test: retry Dispatchers.Main swaps that race DataStore IO threads MainDispatcherRule's setMain/resetMain could throw 'Dispatchers.Main is used concurrently with setting it' when a DataStore IO thread resumed a leftover viewModelScope coroutine mid-swap. A failed setMain left the real Main in place while TestWatcher still ran the test body, so tests hung (UncompletedCoroutinesError) or saw empty state. Retry the transient collision; the swap is idempotent.
PreviousNext