You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2024/01/18 08:17:13 UTC

[PR] HDDS-9506. Remove JUnit4 dependency [ozone]

adoroszlai opened a new pull request, #6028:
URL: https://github.com/apache/ozone/pull/6028

   ## 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:
    * JUnit5's runner for JUnit4 tests (`junit-vintage-engine`)
    * custom timeout rule (`JUnit5AwareTimeout`) added in HDDS-9361
    * checkstyle rule that instructed developers to use `JUnit5AwareTimeout`
    * `allow.junit4` property, used to selectively disallow JUnit4 as we progressed with the migration
   
   Tweaked banned imports:
    * allow `org.junit.platform`, which is from JUnit5
    * ban `MiniDFSCluster` (mini cluster from Hadoop); it was used accidantally by `TestVolumeSet` for some utility method (removed by using `@TempDir`)
    * ban some test utils from Hadoop for which Ozone has alternative
   
   There were two executions of `maven-enforcer-plugin`:
    * `banned-rocksdb-imports` intended to restrict RocksDB classes, but got extended over time with other restrictions; this is overridden (relaxed) in `rocksdb-checkpoint-differ`
    * `ban-junit4-imports` restricted JUnit4 classes
   This PR moves non-RocksDB restrictions to the second execution (to apply them in `rocksdb-checkpoint-differ`, too).  The execution is renamed to `ban-imports` since it's now more generic.
   
   Mention the source of original `MetricsAsserts` code 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


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-9506. Remove JUnit4 dependency [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #6028:
URL: https://github.com/apache/ozone/pull/6028#issuecomment-1900037872

   Thanks @hemantk-12, @kaijchen for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-9506. Remove JUnit4 dependency [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #6028:
URL: https://github.com/apache/ozone/pull/6028


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org