-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
NPE when using nested JUnit5 classes #4393
Comments
@geoand In Junit testing with Quarkus, the test class itself is a bean (see this code). |
Although I agree that we should remedy the error and make it more readable. |
Ok, in that case, I'll send a PR for that later today. |
Cool, thanks! |
@acoburn BTW if you really need it to be |
I think that But of course the question of the usefulness of |
Ah, you're right, just spotted that in their docs - https://junit.org/junit5/docs/current/user-guide/#writing-tests-nested
Yeah, I've got similar experience. |
@manovotn thanks for fixing this so quickly. While it would be nice to use |
When using the
quarkus-junit5
module (Quarkus version 0.23.2) with the@QuarkusTest
annotation, any@Nested
JUnit5 classes consistently lead to null pointer exceptions.The relevant portion of the stack trace is:
I can reproduce this consistently in JDK8 and JDK11, with both Gradle and Maven build environments.
A minimal example of this error can be found at https://github.com/acoburn/quarkus-junit5-test, which is built from the
getting-started
archetype. The only change to the generated code is that the JUnit@Test
is wrapped in a@Nested
class.The text was updated successfully, but these errors were encountered: