Skip to content

Commit

Permalink
[WFCORE-6454] Use TCP/IP process communication for surefire plugin
Browse files Browse the repository at this point in the history
This change utilizes new TCP/IP communication for surefire execution
[1].

By default, the communication writes to STDOUT which may lead to similar
messages in the execution output if something else also writes there at
wrong time:

```
[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1.
See FAQ web page and the dump file ... .dumpstream.
```

This change should mittigate such warnings and also should reduce number
of open files during execution which may lead to crash on some systems
with `nofile` limit set quite low.

Truth is that this issue hasn't been seen in this upstream WildFly Core
project, still I believe this change should be beneficial avoiding
eventual issue in the future.

[1] https://maven.apache.org/surefire/maven-surefire-plugin/examples/process-communication.html
  • Loading branch information
jstourac committed Aug 9, 2023
1 parent 8eab59f commit 83176b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@
See https://issues.apache.org/jira/browse/MNG-2496 -->
<version.org.apache.xalan>2.7.3</version.org.apache.xalan>

<!-- This overrides default version specified in parent pom - reason is to enable TCP/IP communication,
see https://maven.apache.org/surefire/maven-surefire-plugin/examples/process-communication.html -->
<version.surefire.plugin>3.1.2</version.surefire.plugin>

</properties>

<dependencyManagement>
Expand Down Expand Up @@ -323,6 +327,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>false</failIfNoTests>
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
<redirectTestOutputToFile>${testLogToFile}</redirectTestOutputToFile>
<argLine>-Djava.util.logging.manager=org.jboss.logmanager.LogManager</argLine>
<systemPropertyVariables>
Expand Down

0 comments on commit 83176b0

Please sign in to comment.