Skip to content

HADOOP-19978. Upgrade maven-surefire-plugin to 3.6. - #8720

Open
joseluisll wants to merge 1 commit into
apache:trunkfrom
joseluisll:HADOOP-19978
Open

HADOOP-19978. Upgrade maven-surefire-plugin to 3.6.#8720
joseluisll wants to merge 1 commit into
apache:trunkfrom
joseluisll:HADOOP-19978

Conversation

@joseluisll

@joseluisll joseluisll commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description of PR

Upgrades maven-surefire-plugin from 3.5.3 to 3.6.0, plus the three changes the new version needs.

3.6.0 is the first release that registers surefire's listener property as a JUnit Platform TestExecutionListener (SUREFIRE-1639). Eight poms already carry that property for TimedOutTestsListener, and on 3.5.3 it does nothing at all. This bump is what lets HADOOP-19964's listener bind, so a timed-out test prints a thread dump again. Until 19964 lands the listener stays dormant — this change is what unblocks it.

java.net.preferIPv4Stack moves into maven-surefire-plugin.argLine. As a systemPropertyVariable it is applied only after the forked JVM has started. 3.6.0 initialises the fork's networking before applying those properties, so the flag arrives too late and the fork falls back to IPv6, turning 5 of 7 CI test jobs red; 3.5.3 applies them before any networking class loads, which is why the same configuration works there. As an argLine entry the flag is a real JVM startup argument and cannot be late. All the <argLine> overrides in the tree interpolate the property and maven-failsafe-plugin shares it, so it propagates everywhere. hadoop-registry carried a second copy of the same ineffective setting; removed.

-DskipTests is restored over the integration tests. SUREFIRE-823 removed the ${skipTests} binding from maven-failsafe-plugin's own skipTests parameter, so on 3.6.0 -DskipTests skips surefire only and failsafe runs regardless. Measured on a plain mvn install -DskipTests: hadoop-client-integration-tests executed five integration tests including a MiniCluster, and hadoop-azure forked its entire ABFS suite. This binds the parameter back in hadoop-project, so -DskipTests again means no tests at all. skipITs is untouched, so -DskipITs still skips only integration tests and the auth-keys.xml gating in hadoop-aws, hadoop-gcp and hadoop-bos keeps working.

hadoop-common's test-jar added to hadoop-yarn-services-core and hadoop-yarn-applications-catalog-webapp. Both inherit the listener property from hadoop-yarn but resolve only hadoop-common's main jar, so the listener class cannot be loaded there and surefire silently drops it.

How was this patch tested?

WSL2 Ubuntu 24.04, OpenJDK 17, Maven 3.9.16. Full reactor build clean.

Full suites on the modules this touches, all green: hadoop-registry (164 tests), hadoop-yarn-services-core (145), hadoop-yarn-applications-catalog-webapp (5).

hadoop-common full suite run against unpatched trunk at the same commit as a control: every failure reproduces on the baseline, and the two that did not pass on rerun. No new failures.

The tests that fail when 3.6.0 is bumped without the argLine fix all pass: TestDNS, TestNameNodeRpcServer, TestBlockRecovery2, TestWebHdfsTokens, TestHSAdminServer.

Skip semantics verified on hadoop-azure, hadoop-aws and hadoop-client-integration-tests: with the fix, -DskipTests skips both surefire and failsafe in all three; without it, the first and third ran integration tests.

Notes on 3.6.0

3.6.0 removes the legacy surefire-junit3/junit4/junit47/testng providers. The tree has no JUnit 4 or TestNG tests and pins no provider, so this does not apply. Checked and unaffected: stack-trace handling (reimplemented upstream, but output is identical with trimStackTrace=false), @Nested selection, @Suite flake classification, runOrder, and rerun handling under -Dsurefire.rerunFailingTestsCount=2.

Three reporting changes, none needing infrastructure work:

  • <testsuite> gains a flakes attribute.
  • A failure in @AfterAll/@AfterClass is reported as <class>.executionError; on 3.5.3 it produced an empty testcase name.
  • Assumption-skipped tests are counted where 3.5.3 reported zero, which raises hadoop-common's skip count by 40 (two OpenSSL codec classes).

Yetus is unaffected: its junit.sh takes failed-test names from the report filename and greps <failure|<error at file level, so it reads none of these. dorny/test-reporter in report_cloud_aws.yml does publish skipped counts, which will rise.

For code changes:

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

AI Tooling

If an AI tool was used:

Contains content generated by Claude Code.

Bump maven-surefire-plugin.version from 3.5.3 to 3.6.0. 3.6.0 ships
SUREFIRE-1639, which teaches the JUnit Platform provider to read the
"listener" property that eight poms already carry: it loads each named
class and registers it as a TestExecutionListener. The 3.5.3 provider
has no listener handling at all, so the property is inert there. 3.6.0
is the floor: 3.6.0-M1 carries only the JUnit 4 RunListener adapter, not
the TestExecutionListener path.

The listener stays dormant until HADOOP-19964 lands. TimedOutTestsListener
lost its RunListener base in HADOOP-19415, so today it implements neither
interface, and 3.6.0 skips a listener class it cannot adapt.

Move -Djava.net.preferIPv4Stack=true out of surefire's
systemPropertyVariables and into maven-surefire-plugin.argLine.
systemPropertyVariables are applied by the forked booter once the JVM is
already running, so they never reach the fork's input arguments. 3.6.0
initialises the fork's networking before it applies them, so the flag is
read too late and the fork falls back to IPv6; 3.5.3 applies them before
any networking class loads, which is why the same configuration works
there. As an argLine entry the flag is a real JVM startup argument and
cannot be late. The 22 argLine overrides in the tree all interpolate
${maven-surefire-plugin.argLine}, and maven-failsafe-plugin shares the
property, so it propagates everywhere. hadoop-registry carried its own
copy of the same ineffective systemPropertyVariable; drop it, as its
argLine override already interpolates the property.

Restore -DskipTests over the integration tests. SUREFIRE-823 removed the
${skipTests} binding from maven-failsafe-plugin's own skipTests
parameter, so on 3.6.0 -DskipTests skips only surefire and failsafe runs
anyway: hadoop-client-integration-tests executed five integration tests
including a MiniCluster, and hadoop-azure forked its whole ABFS suite,
under a plain "mvn install -DskipTests". Bind the parameter back in
hadoop-project so -DskipTests again means no tests at all. skipITs is
untouched, so -DskipITs still skips only the integration tests and the
auth-keys.xml gating in hadoop-aws, hadoop-gcp and hadoop-bos keeps
working.

Add hadoop-common's test-jar in test scope to hadoop-yarn-services-core
and hadoop-yarn-applications-catalog-webapp. Both inherit the listener
property from hadoop-yarn but resolve only hadoop-common's main jar, by
any path including hadoop-minicluster. Surefire swallows the resulting
ClassNotFoundException and skips the listener without a warning, so
without this the two modules would silently lose it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 54s 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 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 2m 46s Maven dependency ordering for branch
+1 💚 mvninstall 45m 25s trunk passed
+1 💚 compile 16m 15s trunk passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 compile 18m 9s trunk passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 mvnsite 3m 32s trunk passed
+1 💚 javadoc 3m 17s trunk passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javadoc 3m 18s trunk passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 shadedclient 124m 58s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 28s Maven dependency ordering for patch
+1 💚 mvninstall 1m 47s the patch passed
+1 💚 compile 15m 54s the patch passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javac 15m 54s the patch passed
+1 💚 compile 17m 59s the patch passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 javac 17m 59s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 3m 32s the patch passed
+1 💚 javadoc 3m 17s the patch passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javadoc 3m 4s the patch passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 shadedclient 43m 54s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 43s hadoop-project in the patch passed.
+1 💚 unit 1m 37s hadoop-registry in the patch passed.
+1 💚 unit 21m 3s hadoop-yarn-services-core in the patch passed.
-1 ❌ unit 1m 29s /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 failed.
+1 💚 asflicense 1m 19s The patch does not generate ASF License warnings.
234m 30s
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8720/1/artifact/out/Dockerfile
GITHUB PR #8720
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux 744b7de14d00 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d21e0e8
Default Java Ubuntu-17.0.20+8-1-24.04-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12+8-1-24.04-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20+8-1-24.04-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8720/1/testReport/
Max. process+thread count 886 (vs. ulimit of 10000)
modules C: hadoop-project hadoop-common-project/hadoop-registry hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8720/1/console
versions git=2.43.0 maven=3.9.15
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus

Copy link
Copy Markdown

💔 -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 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 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 2m 37s Maven dependency ordering for branch
+1 💚 mvninstall 45m 48s trunk passed
+1 💚 compile 17m 50s trunk passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 compile 17m 49s trunk passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 mvnsite 3m 36s trunk passed
+1 💚 javadoc 3m 20s trunk passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javadoc 3m 12s trunk passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 shadedclient 125m 38s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 29s Maven dependency ordering for patch
+1 💚 mvninstall 1m 43s the patch passed
+1 💚 compile 17m 0s the patch passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javac 17m 0s the patch passed
+1 💚 compile 17m 59s the patch passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 javac 17m 59s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 3m 32s the patch passed
+1 💚 javadoc 3m 3s the patch passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javadoc 3m 9s the patch passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 shadedclient 43m 14s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 44s hadoop-project in the patch passed.
+1 💚 unit 1m 42s hadoop-registry in the patch passed.
-1 ❌ unit 23m 6s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-applications_hadoop-yarn-services_hadoop-yarn-services-core.txt hadoop-yarn-services-core in the patch passed.
-1 ❌ unit 1m 39s /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 failed.
+1 💚 asflicense 1m 15s The patch does not generate ASF License warnings.
237m 40s
Reason Tests
Failed junit tests hadoop.yarn.service.TestYarnNativeServices
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8720/2/artifact/out/Dockerfile
GITHUB PR #8720
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux efa920b301df 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / c86ba55
Default Java Ubuntu-17.0.20+8-1-24.04-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12+8-1-24.04-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20+8-1-24.04-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8720/2/testReport/
Max. process+thread count 891 (vs. ulimit of 10000)
modules C: hadoop-project hadoop-common-project/hadoop-registry hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8720/2/console
versions git=2.43.0 maven=3.9.15
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

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.

2 participants