arturobernalg opened a new pull request, #3553: URL: https://github.com/apache/maven-surefire/pull/3553
A class annotated with @ParameterizedClass registers its tests dynamically during execution, not during discovery, so a childless container survives pruning without ever exposing a descendant identifier for a nested class. collectClassNames matched candidates only by exact identifier class name, so a nested @ParameterizedClass class selected on its own (e.g. via -Dtest=Outer$Inner#test) was never recognized as containing tests and got skipped entirely. Repro and root cause confirmed against junit-jupiter-params 6.1.3: discovering the nested class alone (or together with the outer class) produces a test plan with a single childless container node for the outer class -- regularTest never gets its own identifier at discovery time, only during execution. Added a focused unit test reproducing the issue (JUnit Jupiter nested @ParameterizedClass with no other candidate). Confirmed it fails on unfixed code (expected true, got false) and passes with the fix. Full surefire-junit-platform suite, checkstyle and spotless pass. Fixes #3548 --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004] (https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement] (https://www.apache.org/licenses/icla.pdf). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
