efegokdemir opened a new pull request, #3489:
URL: https://github.com/apache/maven-surefire/pull/3489

   ## Summary
   
   Fixes #3463. TestNG listener failures during JUnit Platform discovery were 
reduced to the generic  message, leaving the actionable cause only in the dump 
file.
   
   ## Changes
   
   - Preserve the original JUnit Platform exception chain while adding the 
deepest cause message to the discovery failure.
   - Add a regression test covering a nested listener failure.
   
   ## Testing
   
   - [INFO] Scanning for projects...
   [INFO] 
   [INFO] ---------< org.apache.maven.surefire:surefire-junit-platform 
>----------
   [INFO] Building Surefire JUnit Platform Runner 3.6.1-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] --------------------------------[ jar 
]---------------------------------
   [INFO] 
   [INFO] --- enforcer:3.6.3:enforce (enforce-bytecode-version) @ 
surefire-junit-platform ---
   [INFO] Rule 0: 
org.codehaus.mojo.extraenforcer.dependencies.EnforceBytecodeVersion passed
   [INFO] 
   [INFO] --- enforcer:3.6.3:enforce (enforce-maven-version) @ 
surefire-junit-platform ---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion 
passed
   [INFO] 
   [INFO] --- enforcer:3.6.3:enforce (enforce-java-version) @ 
surefire-junit-platform ---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion 
passed
   [INFO] 
   [INFO] --- jacoco:0.8.15:prepare-agent (jacoco-agent) @ 
surefire-junit-platform ---
   [INFO] argLine set to 
-javaagent:/Users/efegokdemir/.m2/repository/org/jacoco/org.jacoco.agent/0.8.15/org.jacoco.agent-0.8.15-runtime.jar=destfile=/private/tmp/maven-surefire-3463/surefire-providers/surefire-junit-platform/target/jacoco.exec,includes=**/failsafe/*:**/failsafe/**/*:**/surefire/*:**/surefire/**/*,excludes=**/HelpMojo.class:**/shadefire/**/*:org/jacoco/**/*:com/vladium/emma/rt/*
   [INFO] 
   [INFO] --- checkstyle:3.6.0:check (checkstyle-check) @ 
surefire-junit-platform ---
   [INFO] You have 0 Checkstyle violations.
   [INFO] 
   [INFO] --- spotless:3.7.0:apply (default) @ surefire-junit-platform ---
   [INFO] Spotless apply skipped
   [INFO] 
   [INFO] --- remote-resources:3.3.0:process (process-resource-bundles) @ 
surefire-junit-platform ---
   [INFO] Preparing remote bundle 
org.apache.apache.resources:apache-jar-resource-bundle:1.8
   [INFO] Copying 3 resources from 1 bundle.
   [INFO] 
   [INFO] --- resources:3.5.0:resources (default-resources) @ 
surefire-junit-platform ---
   [INFO] Copying 1 resource from src/main/resources to target/classes
   [INFO] Copying 3 resources from target/maven-shared-archive-resources to 
target/classes
   [INFO] 
   [INFO] --- apache-rat:0.16.1:check (rat-check) @ surefire-junit-platform ---
   [INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, 
generated: 0, approved: 16 licenses.
   [INFO] 
   [INFO] --- compiler:3.15.0:compile (default-compile) @ 
surefire-junit-platform ---
   [INFO] Nothing to compile - all classes are up to date.
   [INFO] 
   [INFO] --- resources:3.5.0:testResources (default-testResources) @ 
surefire-junit-platform ---
   [INFO] skip non existing resourceDirectory 
/private/tmp/maven-surefire-3463/surefire-providers/surefire-junit-platform/src/test/resources
   [INFO] Copying 3 resources from target/maven-shared-archive-resources to 
target/test-classes
   [INFO] 
   [INFO] --- compiler:3.15.0:testCompile (default-testCompile) @ 
surefire-junit-platform ---
   [INFO] Nothing to compile - all classes are up to date.
   [INFO] 
   [INFO] --- surefire:3.5.5:test (default-test) @ surefire-junit-platform ---
   [INFO] Using configured provider 
org.apache.maven.shadefire.surefire.junitplatform.JUnitPlatformProvider
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running 
org.apache.maven.surefire.junitplatform.TestPlanScannerFilterTest
   [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.400 
s -- in org.apache.maven.surefire.junitplatform.TestPlanScannerFilterTest
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
   [INFO] 
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  3.376 s
   [INFO] Finished at: 2026-09-23T19:51:10+03:00
   [INFO] 
------------------------------------------------------------------------ — 
passed (8 tests).
   -  — passed.
   - Checkstyle and RAT passed as part of the focused Maven run.
   - Spotless was skipped because the repository formatter fails on this 
machine's JDK 27 with the baseline  compatibility error.
   
   ## Notes
   
   - The issue was reproduced with the linked TestNG extension reproducer 
before the fix.
   - This change was prepared with AI assistance; I reviewed the changed lines 
and test results.
   - No competing open PR was found for #3463 or the relevant TestNG 
discovery-error keywords.
   - I hereby declare this contribution to be licensed under the Apache License 
2.0.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to