adoroszlai opened a new pull request, #5283: URL: https://github.com/apache/ozone/pull/5283
## What changes were proposed in this pull request? `TestNSSummaryTask` and related tests are implemented as nested classes. If we run the nested test class directly (either explictly, or via some selector, e.g. package name), these nested classes run into exceptions, because JUnit does not execute the `@BeforeClass` setup code in the outer class. This change converts these tests to JUnit5, which handles nested class setup properly. https://issues.apache.org/jira/browse/HDDS-9252 ## How was this patch tested? ``` $ mvn -am -pl :ozone-recon -Dtest='TestNSSummaryTaskWithLegacy$TestProcess' clean test ... [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTaskWithLegacy [INFO] Running org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTaskWithLegacy$TestProcess [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.055 s - in org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTaskWithLegacy$TestProcess [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.768 s - in org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTaskWithLegacy ... $ mvn -am -pl :ozone-recon -Dtest='TestNSSummaryTask$TestReprocess' clean test [INFO] Running org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTask [INFO] Running org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTask$TestReprocess [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 s - in org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTask$TestReprocess [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.876 s - in org.apache.hadoop.ozone.recon.tasks.TestNSSummaryTask ... ``` CI: https://github.com/adoroszlai/hadoop-ozone/actions/runs/6163907068/job/16728478679 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
