I'm aware of the `runTest` workaround for `withTim...
# coroutines
w
I'm aware of the
runTest
workaround for
withTimeout
using
withContext(Dispatchers.Default.limitedParallelism(1))
, but is there a workaround for
Flow.timeout
? I can
flowOn
, but I'd rather not force my entire Flow to a specific dispatcher if possible.
d
If there's no
flowOn(dispatcher)
, then
timeout
will use the dispatcher in which
collect
is called. Collecting inside this
withContext
should typically work. If it doesn't, please share your code (or a simplified version of it).