Any way to get more information out of kotest? I h...
# kotest
j
Any way to get more information out of kotest? I have a test run that gets through 3 tests successfully and then just hangs (using gradle or kotest plugin).
This run is in the gradle testImplementation configuration. I have a coroutines listener to use the coroutines test dispatcher.
removing it doens't make a difference
s
is it just a single test that is hanging ?
j
i'll check, one second
no its not. its all types that use coroutines
tests that use coroutines
s
are you able to share your listener ?
j
this is clearly on my end i just can't figure out what kotest is thinking, since the timeouts never expire or throw
s
what is TestCoroutineDispatcher
and is Dispatchers.setMain some android thing ?
j
not just android, swing or javafx too, anything that has a Main looper for UI rendering
s
are you wanting to run your test on that dispatcher ?
no i am not, i manage that dispatcher in the tests (advancing time etc)
just curious why kotest waits even though there is a timeout and invocation timeout of 60 seconds
s
I think your listener must be changing the dispatcher for the test somehow and the coroutine kotest has created for the test is never completed
if you remove that listener does it complete the tests ?
j
no, it doesn't make a difference
already tried
s
I would keep that listener out for now if it's not making any difference. And I would need to see a test that is failing, perhaps you can pare down the tests until you find the one at fault
j
kk thats my plan, i was just looking for more info from kotest. thanks!
s
you can enable KOTEST_DEBUG=true
as an env var
j
ahh great. jvm arg?
or gradle?
s
env is easist
you can do sys prop too, but gradle is weird about propogating those
j
k i'll give it a go. thanks for your help
👍🏻 1
s
If you can get the failure down to a single test, I will be able to help you fix ti
Or fix kotest if required
j
thanks! that debug stopped on a test (started and then hung) so i am looking at it
quick question, are value/inline classes supported ?
s
supported for what
like just having them around in tests ?
j
just in the test body
ya
kotest 4.6.1
s
yeah I assume so, a test is just
suspend () -> Unit
j
kk
thanks
👍🏻 1
thanks for you help, its a mockk issue
s
ah interesting
j
imma keep that prop on every build unless there is a problem with doing that?
s
no problem if you don't mind the verbose output
j
great thanks again