The reconnect loop could outlive the test body and intermittently fail runTest with UncompletedCoroutinesError.
This commit is contained in:
1 parent
c53ed0a1b8
commit
0491c78c7f
1 file changed
+4
-1
@@ -608,7 +608,10 @@ class AppStoreTest {
|
||||
cache: LibraryCache,
|
||||
player: AudioPlayer,
|
||||
): AppStore = AppStore(
|
||||
scope = this,
|
||||
// Background scope so leftover store jobs (reconnect loops, refreshes)
|
||||
// are cancelled by runTest instead of failing the next test with
|
||||
// UncompletedCoroutinesError.
|
||||
scope = backgroundScope,
|
||||
api = ApiClient(configuredHttpClient(MockEngine { respondError(HttpStatusCode.NotFound) })),
|
||||
storage = storage,
|
||||
player = player,
|
||||
|
||||
Reference in new issue
Block a user