-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing default dispatchers used during suspend calls of Retrofit with test dispatchers. #4206
Comments
Room which provides similar suspend functions provides |
Retrofit does not use dispatchers. Our |
What kind of issue is this?
Changing default dispatchers used during suspend call with test dispatchers.
In our codebase, we launch a bunch of coroutines using scopes and dispatchers which we change in our tests to TestScope and StandardTestDispatchers. This helps us control the execution of those coroutines.
With Retrofit suspend calls, we are currently not able to replace the dispatchers used internally by it. So, we can't ensure that after calling
testScope.testScheduler.advanceUntilIIdle
, the coroutines that have been started have completed their work.For example.
Is there some way or plan to allow replacing the dispatchers used internally by Retrofit?
The text was updated successfully, but these errors were encountered: