-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Test module shall provide ability to replace Dispatchers.IO and Dispatchers.Default #982
Comments
Note, that since |
I think that fact (using same pool) is not very clear to average developer so I would prefer having them separate APIs to make them match the existing public API. something like:
where It could be handy for this class to receive a scheduled executor for further customization though i'm not sure if there is a clear use case for that (vs one that it can create). |
@yigit A test rule is definitely on the radar. |
Any progress here? Wondering how I should test my code using withContext(Dispatchers.Default) while using runBlockingTest |
For now you can probably just inject your Dispatcher so that you can swap it out for |
I wrote about using |
@CDRussell Thanks, actually stumbled upon your blog and implemented that solution 👍 |
Wondering if there is any update on this issue? Just curious on timelines, if there are any. |
Hey team. Any news on this? |
This seems to be as useful for predictable tests as replacing
Dispatchers.Main
. See discussion in #242 and #890.The text was updated successfully, but these errors were encountered: