Skip to content

Commit 3aac009

Browse files
committed
[MINOR][TEST-ONLY] add a test timeout to kill before GitActions
This commit adds a timeout to surefire to allow the tests to timeout, with a log message and stack trace rather than allowing github Actions to kill the CI job. When Actions kill the job, we do not know which tests are running or blocking, while if we kill surefire we will.
1 parent 249a8f5 commit 3aac009

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
<test-parallel>classes</test-parallel>
7777
<test-threadCount>2</test-threadCount>
7878
<test-forkCount>1C</test-forkCount>
79+
<!-- Per-fork timeout in seconds; kills hung forks before the 30 min CI cap. -->
80+
<test-forkedProcessTimeout>1380</test-forkedProcessTimeout>
7981
<rerun.failing.tests.count>2</rerun.failing.tests.count>
8082
<jacoco.skip>false</jacoco.skip>
8183
<checkstyle.skip>true</checkstyle.skip>
@@ -406,6 +408,8 @@
406408
<!-- 1C means the number of threads times 1 possible maximum forks for testing-->
407409
<forkCount>${test-forkCount}</forkCount>
408410
<reuseForks>false</reuseForks>
411+
<!-- Kill hung test forks before CI cancels the whole job. -->
412+
<forkedProcessTimeoutInSeconds>${test-forkedProcessTimeout}</forkedProcessTimeoutInSeconds>
409413
<!-- <reportFormat>brief</reportFormat> -->
410414
<trimStackTrace>true</trimStackTrace>
411415
<rerunFailingTestsCount>${rerun.failing.tests.count}</rerunFailingTestsCount>

0 commit comments

Comments
 (0)