Spek: regression with 2.0.13, discovery fails

Created on 18 Sep 2020  路  7Comments  路  Source: spekframework/spek

I have a regression with spek 2.0.13 (update from 2.0.12 to 2.0.13 fails) it seems like in some modules the test discovery does not work anymore. See https://travis-ci.com/github/robstoll/atrium/jobs/384465747#L1087 and https://travis-ci.com/github/robstoll/atrium/jobs/384465747#L1095

Note that I have implemented a check to see whether a test was run or not. This is the only reason why I have detected this problem.

bug

All 7 comments

Thanks for the report @robstoll! Are you able to provide stacktraces? My guess is it is related to #924, I used coroutines for discovery as well - which means that at any given it may suspend. Are you using mockk by any chance?

There aren't any or rather I don't know how I could get to a potential exception during the discovery phase. It seems like the error is silently swallowed. The build only fails because I have implemented a check that at least 1 test needs to run. Spek is happy if it does not find any tests.
Notice, the discovery still works in some modules but fails for atrium-api-fluent-en_GB-kotlin_1_3-jvm.
I am have a test dependency to mockk in all modules (also the one which pass). I don't use mockk in this particular module

@robstoll Can you try out this build https://bintray.com/spekframework/spek-dev/spek2/2.0.14-alpha.0.4%2B88d54d2 ? Hopefully it fixes the issue you are seeing.

Same result using 2.0.14-alpha.0.4+88d54d2
Is there a way to activate debugging for spek or similar so that I can post here what the discovery does?

Btw. I noted something interesting. Most module have languageVersion 1.2 with the exception of a few where one of them is where the error occurs, this one has 1.3. No idea if this is related to the bug but could be the necessary hint for you.

Btw. I noted something interesting. Most module have languageVersion 1.2 with the exception of a few where one of them is where the error occurs, this one has 1.3. No idea if this is related to the bug but could be the necessary hint for you

Ahh interesting, thanks for pointing this out! I'll do some debugging on my end. If it's an exception, I'm logging it - IIRC there was a problem with JUnit Platform where it wasn't failing when there are discovery exceptions.

btw. I have pushed a branch in case you want to debug it in conjunction with atrium:
https://github.com/robstoll/atrium/tree/spek-927

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amorenew picture amorenew  路  3Comments

volkdown picture volkdown  路  6Comments

jcornaz picture jcornaz  路  4Comments

windyboy picture windyboy  路  3Comments

yaroslav-shlapak picture yaroslav-shlapak  路  4Comments