Since setting `dispatcher` is deprecated in `MockE...
# ktor
b
Since setting
dispatcher
is deprecated in `MockEngine`: Is there an alternative for the following test use case:
Copy code
val testScope = CoroutineScope(coroutineContext + SupervisorJob()) // coroutineContext is from TestDispatcher
testScope.launch {
    println(1)
    delay(10000)
    println(2)
    HttpClient(mockEngine).post("/bla")
    println(3)
}
testCoroutineScheduler.advanceUntilIdle()
println("---------------")
This will print:
Copy code
1
2
---------------
But I expect
advanceUntilIdle
to wait for the http request too.
e
Hey @benkuly, we’re going to revert deprecation and allow changing dispatcher in the future release
a
any update on this?
e
Not yet, it's scheduled for the 2.3.8 release
thank you color 2