github-actions[bot] commented on code in PR #61543:
URL: https://github.com/apache/doris/pull/61543#discussion_r2964211788
##########
run-fe-ut.sh:
##########
@@ -107,22 +107,43 @@ if [[ -z "${FE_UT_PARALLEL}" ]]; then
fi
echo "Unit test parallel is: ${FE_UT_PARALLEL}"
+# Timeout settings for surefire forked JVM processes.
+# If a forked test JVM produces no output for FE_UT_FORK_TIMEOUT seconds,
+# surefire will send SIGQUIT (which triggers a JVM thread dump) and then
Review Comment:
**Inaccurate comment**: Per the [Surefire
docs](https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#forkedProcessTimeoutInSeconds),
`forkedProcessTimeoutInSeconds` is an **absolute wall-clock timeout** — it
kills the forked JVM after N seconds from fork start, regardless of whether
output is being produced.
The comment says "produces no output for FE_UT_FORK_TIMEOUT seconds" which
implies an idle timeout. This is misleading. A legitimate test that runs for
>300s will be killed even if it's actively producing output.
Suggested fix:
```bash
# Timeout settings for surefire forked JVM processes.
# If a forked test JVM runs for more than FE_UT_FORK_TIMEOUT seconds (wall
clock),
# surefire will kill the process, marking the test as ERROR rather than
hanging forever.
```
##########
run-fe-ut.sh:
##########
@@ -107,22 +107,43 @@ if [[ -z "${FE_UT_PARALLEL}" ]]; then
fi
echo "Unit test parallel is: ${FE_UT_PARALLEL}"
+# Timeout settings for surefire forked JVM processes.
+# If a forked test JVM produces no output for FE_UT_FORK_TIMEOUT seconds,
+# surefire will send SIGQUIT (which triggers a JVM thread dump) and then
+# kill the process, marking the test as ERROR rather than hanging forever.
+# FE_UT_FORK_EXIT_TIMEOUT is the additional grace period after the kill signal
+# before surefire force-kills the process.
+if [[ -z "${FE_UT_FORK_TIMEOUT}" ]]; then
+ FE_UT_FORK_TIMEOUT=300
+fi
+if [[ -z "${FE_UT_FORK_EXIT_TIMEOUT}" ]]; then
+ FE_UT_FORK_EXIT_TIMEOUT=60
+fi
+
if [[ "${RUN}" -eq 1 ]]; then
echo "Run the specified class: $1"
# eg:
# sh run-fe-ut.sh --run org.apache.doris.utframe.DemoTest
# sh run-fe-ut.sh --run
org.apache.doris.utframe.DemoTest#testCreateDbAndTable+test2
if [[ "${COVERAGE}" -eq 1 ]]; then
- "${MVN_CMD}" test jacoco:report -DfailIfNoTests=false -Dtest="$1"
+ "${MVN_CMD}" test jacoco:report -DfailIfNoTests=false -Dtest="$1" \
+ -Dsurefire.forkedProcessTimeoutInSeconds="${FE_UT_FORK_TIMEOUT}" \
+
-Dsurefire.forkedProcessExitTimeoutInSeconds="${FE_UT_FORK_EXIT_TIMEOUT}"
Review Comment:
**Bug (Critical): Wrong system property name — this is silently ignored.**
`-Dsurefire.forkedProcessTimeoutInSeconds` is not a recognized Maven
Surefire user property. The `@Parameter` annotation in `SurefireMojo.java`
declares:
```java
@Parameter(property = "surefire.timeout")
private int forkedProcessTimeoutInSeconds;
```
The correct command-line property is **`-Dsurefire.timeout`**. Same issue
with `forkedProcessExitTimeoutInSeconds` — the correct property is
**`-Dsurefire.exitTimeout`**.
As written, both values are silently ignored and the forked JVM timeout
remains at its default (0 = wait forever), making this PR a complete no-op.
Fix all four invocations:
```bash
-Dsurefire.timeout="${FE_UT_FORK_TIMEOUT}" \
-Dsurefire.exitTimeout="${FE_UT_FORK_EXIT_TIMEOUT}"
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]