runBlockingTest has quite a few pitfalls. One of them is this obscure exception: java.lang.IllegalStateException: This job has not completed yet at kotlinx.coroutines.JobSupport.getCompletionExceptionOrNull(JobSupport.kt:1189) at kotlinx.coroutines.test.TestBuildersKt.runBlockingTest(TestBuilders.kt:53) at kotlinx.coroutines.test.TestBuildersKt.runBlockingTest$default(TestBuilders.kt:45) tl;dr: It is thrown when the test body in runBlockingTest suspends and the dispatcher doesn’t know when it will resume. That can happen if suspend funs are called in the test that have to wait for something from outside the test body. Try to avoid such suspend funs within runBlockingTest.