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

Validate that private JUnit Jupiter lifecycle methods are not annotated with @Autowired #32627

Closed
sbrannen opened this issue Apr 12, 2024 · 0 comments
Assignees
Labels
in: test Issues in the test module type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

Overview

In #25966, we introduced support to validate that JUnit Jupiter test methods and lifecycle methods are not annotated with @Autowired, and we explicitly filtered out private methods since JUnit Jupiter has always claimed that private test and lifecycle methods are not supported.

However, by accident, private lifecycle methods are actually supported even if discouraged.

In light of that, we should update our validation check to include private methods as well.

Related Issues

@sbrannen sbrannen added in: test Issues in the test module type: enhancement A general enhancement labels Apr 12, 2024
@sbrannen sbrannen added this to the 6.2.0-M2 milestone Apr 12, 2024
@sbrannen sbrannen self-assigned this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant