Skip to content

Conversation

szetszwo
Copy link
Contributor

Description of PR

HADOOP-19692

The direct junit 4 dependency was removed by HADOOP-19617. However, junit 4 is still pulled transitively by other dependencies.

How was this patch tested?

By the pull request action.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • [NA] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • [NA] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • [NA] If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

Copy link
Contributor

@cnauroth cnauroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 pending pre-commit. I wonder if we will see that some of these test frameworks still need JUnit 4 internally though. Pre-submit should tell us.

@github-actions github-actions bot removed the HDFS label Sep 16, 2025
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+0 🆗 mvndep 12m 11s Maven dependency ordering for branch
+1 💚 mvninstall 47m 40s trunk passed
+1 💚 compile 17m 49s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 15s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 mvnsite 4m 53s trunk passed
+1 💚 javadoc 3m 58s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 26s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 shadedclient 146m 52s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
-1 ❌ mvninstall 0m 53s /patch-mvninstall-hadoop-common-project_hadoop-common.txt hadoop-common in the patch failed.
-1 ❌ compile 1m 23s /patch-compile-root-jdkUbuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.txt root in the patch failed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.
-1 ❌ javac 1m 23s /patch-compile-root-jdkUbuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.txt root in the patch failed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04.
-1 ❌ compile 1m 13s /patch-compile-root-jdkPrivateBuild-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.txt root in the patch failed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.
-1 ❌ javac 1m 13s /patch-compile-root-jdkPrivateBuild-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.txt root in the patch failed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09.
+1 💚 blanks 0m 0s The patch has no blanks issues.
-1 ❌ mvnsite 0m 59s /patch-mvnsite-hadoop-common-project_hadoop-common.txt hadoop-common in the patch failed.
+1 💚 javadoc 2m 9s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 1m 42s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
-1 ❌ shadedclient 10m 7s patch has errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 14s hadoop-project in the patch passed.
-1 ❌ unit 0m 59s /patch-unit-hadoop-common-project_hadoop-common.txt hadoop-common in the patch failed.
+1 💚 unit 5m 32s hadoop-hdfs-httpfs in the patch passed.
-1 ❌ unit 0m 48s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-applications_hadoop-yarn-applications-catalog_hadoop-yarn-applications-catalog-webapp.txt hadoop-yarn-applications-catalog-webapp in the patch passed.
+1 💚 unit 0m 20s hadoop-yarn-applications-mawo-core in the patch passed.
+1 💚 asflicense 0m 32s The patch does not generate ASF License warnings.
173m 47s
Reason Tests
Failed junit tests hadoop.yarn.appcatalog.application.TestAppCatalogSolrClient
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/2/artifact/out/Dockerfile
GITHUB PR #7978
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux b2d417db0dc5 5.15.0-144-generic #157-Ubuntu SMP Mon Jun 16 07:33:10 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 613024d
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/2/testReport/
Max. process+thread count 863 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs-httpfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-mawo/hadoop-yarn-applications-mawo-core U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/2/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@szetszwo
Copy link
Contributor Author

It turns out that we have not completely removed junit tests.

ERROR] /home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-7978/ubuntu-focal/src/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/http/TestHttpFileSystem.java:[57,5] cannot access org.junit.rules.ExternalResource
  class file for org.junit.rules.ExternalResource not found

@szetszwo
Copy link
Contributor Author

... we have not completely removed junit tests.

The reason is that mockwebserver uses junit 4. We should replace it with mockwebserver3-junit5.

@github-actions github-actions bot added the HDFS label Sep 16, 2025
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 10m 57s Maven dependency ordering for branch
+1 💚 mvninstall 49m 40s trunk passed
+1 💚 compile 17m 59s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 25s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 4m 44s trunk passed
+1 💚 mvnsite 4m 53s trunk passed
+1 💚 javadoc 3m 54s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 27s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 41s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 41m 5s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 39s Maven dependency ordering for patch
+1 💚 mvninstall 2m 31s the patch passed
+1 💚 compile 17m 9s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 17m 9s the patch passed
+1 💚 compile 15m 21s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 15m 21s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 4m 32s the patch passed
+1 💚 mvnsite 4m 50s the patch passed
+1 💚 javadoc 3m 55s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 27s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 35s hadoop-project has no data from spotbugs
+1 💚 shadedclient 41m 57s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 36s hadoop-project in the patch passed.
+1 💚 unit 22m 35s hadoop-common in the patch passed.
+1 💚 unit 5m 55s hadoop-hdfs-httpfs in the patch passed.
-1 ❌ unit 1m 10s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-applications_hadoop-yarn-applications-catalog_hadoop-yarn-applications-catalog-webapp.txt hadoop-yarn-applications-catalog-webapp in the patch passed.
+1 💚 unit 0m 42s hadoop-yarn-applications-mawo-core in the patch passed.
+1 💚 asflicense 1m 7s The patch does not generate ASF License warnings.
298m 25s
Reason Tests
Failed junit tests hadoop.yarn.appcatalog.application.TestAppCatalogSolrClient
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/3/artifact/out/Dockerfile
GITHUB PR #7978
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 19a387ca4ff9 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 715044a
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/3/testReport/
Max. process+thread count 1294 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs-httpfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-mawo/hadoop-yarn-applications-mawo-core U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@szetszwo
Copy link
Contributor Author

szetszwo commented Sep 17, 2025

[ERROR] org.apache.hadoop.yarn.appcatalog.application.TestAppCatalogSolrClient.testNotFoundSearch -- Time elapsed: 2.577 s <<< ERROR!
java.lang.NoClassDefFoundError: org/junit/Assert
	...
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at org.apache.solr.util.TestInjection.<clinit>(TestInjection.java:85)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:210)
	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:174)
	at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1290)
	at org.apache.hadoop.yarn.appcatalog.application.EmbeddedSolrServerFactory.create(EmbeddedSolrServerFactory.java:96)
	at org.apache.hadoop.yarn.appcatalog.application.EmbeddedSolrServerFactory.create(EmbeddedSolrServerFactory.java:55)
	at org.apache.hadoop.yarn.appcatalog.application.TestAppCatalogSolrClient.setup(TestAppCatalogSolrClient.java:53)

The test failure is not easy to fix:

  • TestAppCatalogSolrClient uses solr-test-framework from Apache Solr, which further uses LuceneTestCase from Apache Lucene.

The junit 4 Assert is in LuceneTestCase. Not sure if updating the solr-test-framework version 8.11.2 could fix it.

Will revert the change and fix it separately.

@github-actions github-actions bot removed the YARN label Sep 17, 2025
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 11m 52s Maven dependency ordering for branch
+1 💚 mvninstall 48m 8s trunk passed
+1 💚 compile 17m 56s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 15m 19s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 4m 41s trunk passed
+1 💚 mvnsite 4m 49s trunk passed
+1 💚 javadoc 3m 58s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 26s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 42s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 41m 30s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 37s Maven dependency ordering for patch
+1 💚 mvninstall 2m 34s the patch passed
+1 💚 compile 16m 58s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 16m 58s the patch passed
+1 💚 compile 15m 14s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 15m 14s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 4m 37s the patch passed
+1 💚 mvnsite 4m 51s the patch passed
+1 💚 javadoc 3m 56s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 3m 27s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+0 🆗 spotbugs 0m 37s hadoop-project has no data from spotbugs
+1 💚 shadedclient 41m 8s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 36s hadoop-project in the patch passed.
+1 💚 unit 22m 38s hadoop-common in the patch passed.
+1 💚 unit 5m 54s hadoop-hdfs-httpfs in the patch passed.
+1 💚 unit 1m 15s hadoop-yarn-applications-catalog-webapp in the patch passed.
+1 💚 unit 0m 42s hadoop-yarn-applications-mawo-core in the patch passed.
+1 💚 asflicense 1m 6s The patch does not generate ASF License warnings.
297m 9s
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/4/artifact/out/Dockerfile
GITHUB PR #7978
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux ded193a6470d 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 90ed7ec
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/4/testReport/
Max. process+thread count 2987 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs-httpfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-mawo/hadoop-yarn-applications-mawo-core U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7978/4/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@szetszwo
Copy link
Contributor Author

szetszwo commented Sep 17, 2025

The junit 4 Assert is in LuceneTestCase. Not sure if updating the solr-test-framework version 8.11.2 could fix it.

Probably not -- the current code in LuceneTestCase still says, "Base class for all Lucene unit tests, Junit3 or Junit4 variant."
https://github.com/apache/lucene/blob/13a7e1e53d0e69233e775f2fb241b86c3ac0e527/lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.java#L202C1-L217C3

@szetszwo
Copy link
Contributor Author

Filed HADOOP-19699 for TestAppCatalogSolrClient

@szetszwo szetszwo merged commit a1d2cf4 into apache:trunk Sep 18, 2025
4 checks passed
@szetszwo
Copy link
Contributor Author

Thanks @cnauroth and @slfan1989 for reviewing this!

@slfan1989
Copy link
Contributor

Thanks @cnauroth and @slfan1989 for reviewing this!

@szetszwo Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants