-
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
JUnit: Wrong test method passed in TestInfo parameter of BeforeEach/AfterEach methods #19747
Comments
/cc @stuartwdouglas |
/cc @geoand |
I have a fix for this, will send a PR soon. |
#19751 should take care of it. Thanks for reporting, btw! |
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Aug 30, 2021
Fixes quarkusio#19747 (cherry picked from commit 5db60de)
@famod Thanks a lot for providing a fix so quickly. Our JUnit tests are all green again with version 2.2.1.Final 👍 |
@jonathan-meier great to hear! Just beware that there is a regression w.r.t. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Consider the following test class:
Expected behavior
The currently running test method annotated with
@Test
(testMethod
in the test class above) should be passed viatestInfo
inbefore
andafter
.Actual behavior
The methods
before
andafter
are passed in respectively, which is wrong.How to Reproduce?
Repro: Just run the test class provided above in Quarkus
2.2.0.Final
.Additional information
Quarkus version
2.1.4.Final
works as expected. This is likely a regression introduced with PR #19518.Likely also related: the class of the passed test method has a different class loader than the class of the currently executing
before
/after
method.The text was updated successfully, but these errors were encountered: