-
Notifications
You must be signed in to change notification settings - Fork 305
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
classes().that().implement(SomeClass.class) breaks build #1377
Comments
The reason for this is that ArchUnit considers it a "programmer error" to pass a class to that method when it expects an interface (this is also documented in the Javadoc, that an interface must be passed to the method or else an exception will be thrown). |
Sure, but is it necessary to break the build and swallow the reason? Without the -X argument to Maven it is truly hard to understand what is going on. One could of course question if it's good Surefire behaviour. |
Yeah, I see your point, but for me that really is bad Surefire behavior. ArchUnit throws a clear exception giving the exact reason. That Maven / Surefire swallows it like this and makes it so hard to see the reason I don't consider a problem of ArchUnit. I had the same things also in other cases when running tests, it basically always happens if something goes wrong in the static context, Surefire always makes it extremely hard to see the real cause there. But that's nothing specific to ArchUnit in my opinion. |
I'm gonna close this for now, because as said I think the problem is really how Surefire makes it hard to see exceptions in the static context, and that is out of scope to fix here (you could open an issue with the Surefire plugin maintainers though). |
My test is
I changed DDBItem from being an interface to a class. Since then, I would
expect:
test fails with a sensible error message such as "DDBItem.class foes not denote an interface!"
but I get:
There was an error in the forked process
in more detail:
The text was updated successfully, but these errors were encountered: