Copilot commented on code in PR #3655:
URL: https://github.com/apache/maven-surefire/pull/3655#discussion_r4729365033
##########
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/DefaultReporterFactory.java:
##########
@@ -165,6 +165,7 @@ public RunResult close() {
for (TestSetRunListener listener : listeners) {
listener.close();
}
+ createStatisticsReporter().runCompleted();
Review Comment:
If the final statistics write fails (for example, because the disk is full),
`StatisticsReporter.runCompleted()` throws a `RuntimeException` from this new
call. `ForkStarter.run()` invokes `reportMerger.close()` before shutting down
its schedulers and timeout dispatcher (ForkStarter.java:294–300), so that
exception skips all of that cleanup and leaves the periodic timeout task
running in the Maven JVM. Put the shutdown operations in a nested `finally` so
they still execute when statistics persistence fails.
--
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]