-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
QuarkusTest does not run @BeforeEach method of outer class when using @Nested test classes #23947
Labels
Milestone
Comments
/cc @geoand |
Sgitario
added a commit
to Sgitario/quarkus
that referenced
this issue
Mar 8, 2022
Sgitario
added a commit
to Sgitario/quarkus
that referenced
this issue
Mar 8, 2022
Proposed solution in #24172 |
famod
pushed a commit
to Sgitario/quarkus
that referenced
this issue
Mar 8, 2022
Sgitario
added a commit
to Sgitario/quarkus
that referenced
this issue
Mar 9, 2022
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Mar 14, 2022
Fix quarkusio#23947 (cherry picked from commit a66f993)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Given the following test class:
Expected behavior
Both the outer and the inner
@BeforeEach
method are called before the test. Therefore the test succeeds.Actual behavior
The test fails because
outerValue
is actualnull
. If the@QuarkusTest
annotation is removed from the outer class, the test succeeds as expected.How to Reproduce?
Run the test above.
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment Temurin-11.0.13+8 (build 11.0.13+8) OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4
Additional information
If the public modifier of the outer class is removed, the test does not run at all and the following stacktrace is produced:
The text was updated successfully, but these errors were encountered: