Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
preventing CI from hanging indefinitely on Windows file-lock issues or
any other test that never terminates. Override per-module if needed. -->
<surefire.forkedProcessTimeout>300</surefire.forkedProcessTimeout>
<!-- Set to 'ping' on Windows 11+ where wmic is unavailable: -Dsurefire.enableProcessChecker=ping -->
<surefire.enableProcessChecker>all</surefire.enableProcessChecker>

<siteId>activemq-${project.version}</siteId>
<projectName>Apache ActiveMQ</projectName>
Expand Down Expand Up @@ -967,7 +969,7 @@
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<forkedProcessTimeoutInSeconds>${surefire.forkedProcessTimeout}</forkedProcessTimeoutInSeconds>
<enableProcessChecker>all</enableProcessChecker>
<enableProcessChecker>${surefire.enableProcessChecker}</enableProcessChecker>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already the case right?

My understanding is that you are using just a Maven property instead of having the setting all inline (in the test profile).

Can you elaborate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is exactly what this change does.

Before, the value was hardcoded inline in the surefire plugin configuration:
<enableProcessChecker>all</enableProcessChecker>

After, it is driven by a Maven property with all as the default:
<!-- in <properties> -->
<surefire.enableProcessChecker>all</surefire.enableProcessChecker>

<!-- in surefire plugin config -->
<enableProcessChecker>${surefire.enableProcessChecker}</enableProcessChecker>

The default value is unchanged so CI and all existing environments behave identically. The only difference is that a developer on Windows 11 (where wmic is no longer available) can now override it on the command line without patching the pom:
mvn test -Dsurefire.enableProcessChecker=ping

This change follows the same pattern already used in this pom for surefire.forkedProcessTimeout and surefire.argLine.

<failIfNoTests>false</failIfNoTests>
<systemPropertyVariables>
<java.awt.headless>true</java.awt.headless>
Expand Down