Skip to content

Commit 9a4e2a3

Browse files
authored
[MINOR] Upgrade Surefire to 3.5.2 and enforce fork exit timeout
Fix intermittent ~26 minute hangs in the **.component.c**.** GitHub Actions job. The forks were finishing their test classes but failing to exit cleanly (leaked non-daemon threads from test executors), and Surefire 3.0.0 did not reliably enforce its fork shutdown timeout.
1 parent 88c26e2 commit 9a4e2a3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<slf4j.version>2.0.11</slf4j.version>
5454
<log4j.version>2.22.1</log4j.version>
5555
<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
56-
<maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
56+
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
5757
<maven-checkstyle-plugin.version>3.3.1</maven-checkstyle-plugin.version>
5858
<maven-remote-resources-plugin.version>3.0.0</maven-remote-resources-plugin.version>
5959
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
@@ -410,6 +410,10 @@
410410
<reuseForks>false</reuseForks>
411411
<!-- Kill hung test forks before CI cancels the whole job. -->
412412
<forkedProcessTimeoutInSeconds>${test-forkedProcessTimeout}</forkedProcessTimeoutInSeconds>
413+
<!-- Force-kill forks that still have live threads after the test class completes. -->
414+
<forkedProcessExitTimeoutInSeconds>30</forkedProcessExitTimeoutInSeconds>
415+
<!-- Let forks detect a dead parent and self-terminate. -->
416+
<enableProcessChecker>native</enableProcessChecker>
413417
<!-- <reportFormat>brief</reportFormat> -->
414418
<trimStackTrace>true</trimStackTrace>
415419
<rerunFailingTestsCount>${rerun.failing.tests.count}</rerunFailingTestsCount>

0 commit comments

Comments
 (0)