Hi! The conversion from Junit 4 to Juni 5 is going full steam ahead, spearheaded by Shilun Fan.
While this in itself is great, the problem is that the current Hadoop Maven test setup is very broken, and hides a lot of tests that get broken by this. The Maven test setup brokenness is not directly related to the Junit 5 migration, but as all test are touched, there are simply a lot more new test breakages that are never detected because of the broken Surefire Hadoop uses. Problem 1: The current surefire silently ignores many timeouts. Even before Junit 5 migration started, there were already some tests that were timing out, but were not reported as failing, like TestPipeApplication (MAPREDUCE-7502) ... [INFO] Running org.apache.hadoop.mapred.TestTaskPerformanceSplits [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.052 s - in org.apache.hadoop.mapred.TestTaskPerformanceSplits [INFO] Running org.apache.hadoop.mapred.pipes.TestPipeApplication [INFO] Running org.apache.hadoop.mapred.pipes.TestPipesNonJavaInputFormat [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.563 s - in org.apache.hadoop.mapred.pipes.TestPipesNonJavaInputFormat ... [INFO] Results: [INFO] [WARNING] Tests run: 574, Failures: 0, Errors: 0, Skipped: 1 [INFO] [ERROR] There was a timeout or other error in the fork [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS Problem 2: Surefire silently ignores any failures in @Before* @After* methods. This is also a pre-existing problem, but as tests are updated to Junit 5 (especially when parents/children are in different modules), this leads to huge number of new unreported errors. This are some tests on trunk: stoty@a473b6d4f017:~/hadoop$ mvn clean test -am -pl hadoop-hdfs-project/hadoop-hdfs -Dtest=TestViewFileSystemAtHdfsRoot,TestViewFileSystemHdfs,TestViewFileSystemLinkFallback,TestViewFileSystemLinkMergeSlash,TestViewFileSystemLinkRegex,TestViewFileSystemLocalFileSystem,TestViewFileSystemWithAuthorityLocalFileSystem -Dsurefire.failIfNoSpecifiedTests=false ... [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkMergeSlash [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.084 s - in org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkMergeSlash [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkFallback [INFO] Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.655 s - in org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkFallback [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkRegex [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.513 s - in org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkRegex [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemHdfs [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 39.353 s - in org.apache.hadoop.fs.viewfs.TestViewFileSystemHdfs [INFO] [INFO] Results: [INFO] [INFO] Tests run: 41, Failures: 0, Errors: 0, Skipped: 0 ... This are the same tests after fixing Surefire, Junit 5 and the migration problems on my Java 24 branch: (with HADOOP-19550 fixed) [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkMergeSlash [INFO] Tests run: 95, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.20 s -- in org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkMergeSlash [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemAtHdfsRoot [INFO] Tests run: 91, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.39 s -- in org.apache.hadoop.fs.viewfs.TestViewFileSystemAtHdfsRoot [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkFallback [INFO] Tests run: 112, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 34.84 s -- in org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkFallback [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkRegex [INFO] Tests run: 96, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 29.52 s -- in org.apache.hadoop.fs.viewfs.TestViewFileSystemLinkRegex [INFO] Running org.apache.hadoop.fs.viewfs.TestViewFileSystemHdfs [ERROR] Tests run: 102, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 63.50 s <<< FAILURE! -- in org.apache.hadoop.fs.viewfs.TestViewFileSystemHdfs [ERROR] org.apache.hadoop.fs.viewfs.TestViewFileSystemHdfs.testTrashRootsAfterEncryptionZoneDeletion -- Time elapsed: 0.239 s <<< ERROR! java.lang.NullPointerException: KeyVersion name 'test_key@0' does not exist ... [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] TestViewFileSystemHdfs.testTrashRootsAfterEncryptionZoneDeletion:208 ยป NullPointer KeyVersion name 'test_key@0' does not exist [INFO] [ERROR] Tests run: 496, Failures: 0, Errors: 1, Skipped: 0 [INFO] [ERROR] Currently Hadoop is reporting only *41* out of *496* tests, the rest are* silently failing*. (There is one test still failing, I haven't tracked down the cause, though probably that failure is also just getting ignored on trunk) I have opened https://issues.apache.org/jira/browse/HADOOP-19528 , and a PR https://github.com/apache/hadoop/pull/7574 to update Surefire and Junit 5 to the latest version. With those changes, there will be a lot of failures in the tests, but those are just failures that are currently silently ignored. I propose fixing the test config ASAP, and then dealing with the fallout of the previously unreported broken tests. Istvan