https://kotlinlang.org logo
#kotest
Title
# kotest
c

charleskorn

05/23/2022, 10:51 PM
Are there any known issues with setting
assertionMode
to
Error
and tests that use coroutines? My test uses coroutines and makes assertions (and the test fails if the assertions fail), but I still get a
Test … did not invoke any assertions
error.
j

Jim

05/24/2022, 12:38 AM
There are issues with the way clue and assertsoftly work I believe and the assertion mode, since the assertion counter is (or was) thread local and not coroutine aware
c

charleskorn

05/24/2022, 8:04 AM
Do you know if there an open issue or PR for this? I couldn't find one
j

Jim

05/24/2022, 9:20 PM
This is where Sam added a coroutine aware error collector, I'm not sure if he did the same for assertionCounter or not, it doesn't look like it. I recall that we were wary about that because it would force everyone who was using kotest assertions and not the runtime to include coroutines when maybe they were just some sad java devs who wanted a nicer life for themselves with the good assertions.
c

charleskorn

05/28/2022, 4:22 AM
No worries - I’ve raised https://github.com/kotest/kotest/issues/3022 for this
7 Views