Maciek
03/25/2020, 8:08 PMrunBlockingTest
function. From this test I'm running code that launches coroutine from MainScope
object that is suppose to have TestCoroutineDispatcher
but I can't seem to run delay
function inside that coroutine because I'm getting UncompletedCoroutinesError
exception. Is my test setup wrong or I just can't test a code that has delay
functions?
I don't really need that delay but was just wondering why it doesn't work, I thought that runBlocking and TestCoroutineDispatcher will take care of such casesDennis
03/25/2020, 9:31 PMliminal
03/26/2020, 1:47 AMrunBlockingTest
are you using? You may be running into this issue https://craigrussell.io/2019/11/unit-testing-coroutine-suspend-functions-using-testcoroutinedispatcher/Maciek
03/26/2020, 6:25 AMTestCoroutineDispatcher.runBlockingTest
but now I can't use my test extension from junit5 because it's not like junit4 rule where you're defining it as a class member@RegisterExtension
field, now everything works, thanks!