Why does `gradle kotest` exit code 0 on failed tes...
# kotest
e
Why does
gradle kotest
exit code 0 on failed tests but
gradle test
correctly returns 1? Is there a setting for this? Tested on kotest 6.0.2, gradle 9.0.0.
s
Probably kotest task not handling test errors as an exit
that was added to 6.0.3
maybe throwing isn't sufficient to cause gradle to exit, I can try an exitProcess(1) like the other platforms
ooh you tried 6.0.2
can you try 6.0.3 ?
e
yes, sorry it was a typo
but I wonder if it was like that in 5.x too
s
the kotest task is new
e
I was using the plugin before
s
oh
the old one
e
i suppose so; now archived
s
yes
that was moved into the main repo and overhauled
e
I think 6.0.03 does not fix it, based on a quick test.
Look at the exit codes below. The first one is
gradle kotest
, exiting with 0. I can upload a MWE and create a ticket if it helps. This is a bug, right?
I also suspect kotest is not terminating properly; there are zombie processes related to the tests.
s
definitely a bug
I think just need to flip to a system exit instead of throwing an exception
If you want to try a snapshot build I can do that now?
e
i'll revert to regular test until it is fixed in 6.0.4? after the fix I'll see if the zombies are still around.
s
that would unblock you, but if its just a case of switching to System.exit I'm happy to release 6.0.4 right now
not sure how to test it quickly
just any failing test ?
e
any failing test I think
I cloned your tests repo and created a 1==2 test to trigger failure
s
the kotest-examples one ?
e
yes
s
works running the test task from intellij
I see "success" at the cli (so is not doing it right)
e
nice to have a reproduction.
s
yes
tryng to fix now
ok I got it failing
e
p.s. 6.0.3 is not yet in GH releases
s
ah thanks
👍 1
fixd