Hey, guys,. There is a problem about kotlin coroutine. I used
kotlinx-coroutines-test
library to test my coroutines code. But after I used
TestCoroutineDispatcher
to mock the dispatcher, the coroutine resumed continually until throw an exception with the message:
Copy code
kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[TestCoroutineDispatcher[currentTime=0ms, queued=0], Continuation at xxx.viewmodel.CarListViewModel$loadCars$1.invokeSuspend(CarListViewModel.kt)@1da6ee17]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers