Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression with 2.0.13, discovery fails #927

Open
robstoll opened this issue Sep 18, 2020 · 7 comments
Open

regression with 2.0.13, discovery fails #927

robstoll opened this issue Sep 18, 2020 · 7 comments
Labels

Comments

@robstoll
Copy link
Contributor

robstoll commented Sep 18, 2020

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.

@robstoll robstoll changed the title regression with 2.0.13 regression with 2.0.13, discovery fails Sep 18, 2020
@raniejade
Copy link
Member

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?

@robstoll
Copy link
Contributor Author

robstoll commented Sep 19, 2020

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

@raniejade
Copy link
Member

@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.

@robstoll
Copy link
Contributor Author

robstoll commented Nov 9, 2020

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?

@robstoll
Copy link
Contributor Author

robstoll commented Nov 9, 2020

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.

@raniejade
Copy link
Member

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.

@robstoll
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants