-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
New "ConfinedTestDispatcher" variation #3279
Comments
I don't know anything about "middleware", but from a cursory glance, it doesn't look like it utilizes the concept of a thread at all, being a thing for JS. So, are there any downsides to just using |
Thank you for looking into this @dkhalanskyjb !
MVI and the middleware concept can be seen for us as basically the "chain or responsability pattern" - a series of objects for handling a stream of specific actions, each action potentially being handled in a new coroutine possibily on another thread. Confining everything to one thread would then come to assure us that no |
This is the part I don't understand: what is the thing that |
We were thinking about the unconfined nature of the appropriately named dispatcher.. |
See the docs on Dispatchers.Unconfined: if your test does not use more than one thread on its own (by manually creating threads or using non-mocked |
We do have some threads "manually" created. |
I'm trying to find this usage that you're describing in the Regarding serialization of events, I think that, typically, |
We have to use in many places (not all appearing in the Github query) our custom The |
(Continuing from #3246 (comment))
kotlin-coroutines
1.6.0 came with a new API and multiplatform support.Trying to decide between
UnconfinedTestDispatcher
andStandardTestDispatcher
we saw the need for maybe a new variation that would combine the two to provide:with the broad goal of getting serial task execution on the same thread and in that allow for testing a bit more than just one task at a time without having to sprinkle
runCurrent
oradvanceTimeUntilIdle
all throughout.The text was updated successfully, but these errors were encountered: