[
https://issues.apache.org/jira/browse/HADOOP-19617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18018521#comment-18018521
]
Shilun Fan commented on HADOOP-19617:
-------------------------------------
[~szetszwo] Thank you very much for your question — this is a great topic.
Below are some personal thoughts; I welcome further discussion or additions.
*Internal drivers*
While adding support for JDK 11, our codebase ended up containing both JUnit 4
and JUnit 5 test cases, resulting in a mixed testing framework. This mixed
state caused several practical issues:
* Some unit tests were ignored or skipped.
* The HDFS and Hadoop Common modules experienced stability problems such as
thread crashes and OOMs (OutOfMemoryErrors).
* Upgrading the Maven Surefire plugin without first unifying the test
framework actually increased the number of skipped tests, undermining
regression verification and coverage.
Therefore, the mixed mode is unsustainable. Considering compatibility,
maintenance cost, and community trends, reverting to pure JUnit 4 is not
feasible — moving forward and unifying on JUnit 5 is the more reasonable choice.
*External drivers*
* JUnit 4 is now in maintenance mode; its latest release was in 2021 and it no
longer receives active feature updates for newer JDKs. The project and
community encourage migration to JUnit 5.
* Several ecosystem projects (for example, Flink, Iceberg, and Ozone) are
undertaking or have completed similar upgrades, indicating this is a common and
necessary trend.
*References*
* JUnit 4: [https://github.com/junit-team/junit4]
* JUnit 5: [https://docs.junit.org/current/user-guide/]
* Flink upgrade discussion: https://issues.apache.org/jira/browse/FLINK-25325
* Iceberg project board: [https://github.com/orgs/apache/projects/305]
* Ozone related issue: https://issues.apache.org/jira/browse/HDDS-6729
> [JDK17] Remove JUnit4 Dependency
> --------------------------------
>
> Key: HADOOP-19617
> URL: https://issues.apache.org/jira/browse/HADOOP-19617
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
>
> Due to the extensive JUnit4 dependencies in the Hadoop modules, we will
> attempt to remove JUnit4 dependencies on a module-by-module basis.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]