This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch maven2surefire-jvm-communication
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 97f84087fdd3ecef890982d3e9a6c24dab40f5f7
Author: tibordigana <tibordig...@apache.org>
AuthorDate: Sun Feb 9 10:46:42 2020 +0100

    fixed ForkStarter
---
 .../org/apache/maven/plugin/surefire/booterclient/ForkStarter.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
index 71c0f25..a23d656 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
@@ -625,7 +625,8 @@ public class ForkStarter
         CloseableDaemonThread err = null;
         DefaultReporterFactory reporter = 
forkClient.getDefaultReporterFactory();
         currentForkClients.add( forkClient );
-        CountdownCloseable countdownCloseable = new CountdownCloseable( 
eventConsumer, 2 );
+        CountdownCloseable countdownCloseable =
+            new CountdownCloseable( eventConsumer, 1 + ( 
forkChannel.useStdOut() ? 1 : 0 ) );
         try ( CommandlineExecutor exec = new CommandlineExecutor( cli, 
countdownCloseable ) )
         {
             CommandlineStreams streams = exec.execute();

Reply via email to