You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/08/25 00:04:08 UTC
(maven-executor) branch executor-38-fail-red created (now b88261d)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch executor-38-fail-red
in repository https://gitbox.apache.org/repos/asf/maven-executor.git
at b88261d Keep surefire reports from a failed run
This branch includes the following new commits:
new 2531d4d Run test timeouts on a separate thread so a wedged test fails
new b88261d Keep surefire reports from a failed run
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-executor) 02/02: Keep surefire reports from a failed run
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch executor-38-fail-red
in repository https://gitbox.apache.org/repos/asf/maven-executor.git
commit b88261da6dc6bd17c66521c1e9884c2b00491a37
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue Aug 25 02:03:33 2026 +0200
Keep surefire reports from a failed run
redirectTestOutputToFile is on, so a test that stops before printing anything to
the job log leaves its only record in target/surefire-reports, which the runner
discards with the workspace. That includes the .dump thread dump Surefire writes
when it kills a timed-out fork.
---
.github/workflows/maven-verify.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 688eff1..99718d8 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -31,3 +31,6 @@ jobs:
jdk-matrix: '[ "17", "21", "26" ]'
maven4-enabled: true
maven4-version: '4.0.0-rc-6' # the same as used in project
+ # redirectTestOutputToFile keeps per-test output out of the job log, so on a failure the
+ # reports are the only record of what the test printed before it stopped.
+ failure-upload-path: '**/target/surefire-reports'
(maven-executor) 01/02: Run test timeouts on a separate thread so a wedged test fails
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch executor-38-fail-red
in repository https://gitbox.apache.org/repos/asf/maven-executor.git
commit 2531d4da4f80eb588d5f3fe59f6933450e84fa6d
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue Aug 25 02:03:33 2026 +0200
Run test timeouts on a separate thread so a wedged test fails
@Timeout defaults to SAME_THREAD, where the watcher interrupts the test thread
once and then has nothing left to fire. FastTerminal.getTerminal catches
Exception, InterruptedException included, and the caller re-enters the blocking
call, so the single interrupt is swallowed and the test hangs past its 60s
budget. The dumps on apache/maven#12761 show the watcher's queue already drained
while the test thread is still parked.
Verified: a probe that swallows the interrupt and re-parks reports
"Tests run: 0 ... There was a timeout in the fork" under SAME_THREAD and
"Tests run: 1, Errors: 1 ... timed out after 5 seconds" with the blocked stack
frame under SEPARATE_THREAD.
---
pom.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/pom.xml b/pom.xml
index a123061..3be02a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -250,6 +250,16 @@
! healthy run of the whole module takes well under two.
-->
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
+ <!--
+ ! @Timeout defaults to SAME_THREAD, where the watcher interrupts the test thread once and
+ ! then has nothing left to fire. Code that catches InterruptedException and re-enters the
+ ! blocking call outlives that single interrupt, and the test hangs anyway. A separate
+ ! thread reports the timeout from the watcher side, whether or not the worker unblocks,
+ ! and carries the stack trace of the frame that blocked.
+ -->
+ <properties>
+ <configurationParameters>junit.jupiter.execution.timeout.thread.mode.default = SEPARATE_THREAD</configurationParameters>
+ </properties>
</configuration>
</plugin>
</plugins>