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

Exceptions are swallowed when running tests within Maven #967

Open
cdprete opened this issue Nov 8, 2022 · 1 comment
Open

Exceptions are swallowed when running tests within Maven #967

cdprete opened this issue Nov 8, 2022 · 1 comment

Comments

@cdprete
Copy link

cdprete commented Nov 8, 2022

Hello.
I'm using mockk 1.12.5 in a Kotlin project built with Maven and it seems like that exceptions happening during the initialization of the mocks are just, somehow, swallowed making Surefire to not discover/run any test within a test class.

For example, with mvn clean test:
image

The same, with mvn clean test -X:
image

I tried updating mockk to mockk-jvm 1.13.2 and that version correctly detects the issue but then, for some reason, when mocking objects, somehow the real objects are instantiated - although wrongly - causing NPEs.

@cdprete
Copy link
Author

cdprete commented Jan 23, 2023

The issue regarding the upgrade is caused by #1015 and it's reproducible with #1015 (comment)

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

No branches or pull requests

1 participant