HDDS-9506. Remove JUnit4 dependency #6028
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Remove dependency on JUnit4.
Some modules still get JUnit4 as a transitive dependency (required by third-party libraries), so keep banning the import of JUnit4 classes. The ban now applies to all Ozone modules.
Remove JUnit4-specific items we no longer need:
junit-vintage-engine)JUnit5AwareTimeout) added in HDDS-9361JUnit5AwareTimeoutallow.junit4property, used to selectively disallow JUnit4 as we progressed with the migrationTweaked banned imports:
org.junit.platform, which is from JUnit5MiniDFSCluster(mini cluster from Hadoop); it was used accidentally byTestVolumeSetfor some utility method (removed by using@TempDir)There were two executions of
maven-enforcer-plugin:banned-rocksdb-importsintended to restrict RocksDB classes, but got extended over time with other restrictions; this is overridden (relaxed) inrocksdb-checkpoint-differban-junit4-importsrestricted JUnit4 classesThis PR moves non-RocksDB restrictions to the second execution (to apply them in
rocksdb-checkpoint-differ, too). The execution is renamed toban-importssince it's now more generic.Mention the source of original
MetricsAssertscode in javadoc comment, as suggested by @kerneltime in #5987.https://issues.apache.org/jira/browse/HDDS-9506
How was this patch tested?
CI:
https://github.com/adoroszlai/ozone/actions/runs/7563582590