Different testCoroutineDispatcher is used within each block #2703
Labels
bug 🐛
Issues that report a problem or error in the code.
framework 🏗️
Pertains to the core structure and components of the Kotest framework.
Milestone
I'm using 5.0.1 version of kotest.
I have the following class:
and I have the following test
The first test
Target - 1
passes successfully as expected. Bu the second testTarget - 2
fails with a timeout. After a while of debugging, I found that each block (Given, When, And, Then) is using different TestCoroutineDispatcher soadvanceTimeBy
in the And block is advancing a different dispatcher that is used in the When block. This causes the test to be stuck and is finished by timeout.I'm not sure if such behavior is done by intent, but I wasn't expecting that so I think that this is a bug in the library.
However, thanks for the library works very fine otherwise.
The text was updated successfully, but these errors were encountered: