You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2022/02/04 04:23:05 UTC

[maven-surefire] branch master updated: [SUREFIRE-2002] TCP client throws WritePendingException

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7e5fc78  [SUREFIRE-2002] TCP client throws WritePendingException
7e5fc78 is described below

commit 7e5fc782c5378586e4668a2ba137ee51058ff6b8
Author: Tibor Digaňa <ti...@apache.org>
AuthorDate: Thu Feb 3 23:40:28 2022 +0100

    [SUREFIRE-2002] TCP client throws WritePendingException
---
 .../booter/spi/SurefireMasterProcessChannelProcessorFactory.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/SurefireMasterProcessChannelProcessorFactory.java b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/SurefireMasterProcessChannelProcessorFactory.java
index 6232209..6af7bb8 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/SurefireMasterProcessChannelProcessorFactory.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/SurefireMasterProcessChannelProcessorFactory.java
@@ -86,7 +86,10 @@ public class SurefireMasterProcessChannelProcessorFactory
             if ( sessionId != null )
             {
                 ByteBuffer buff = ByteBuffer.wrap( sessionId.getBytes( US_ASCII ) );
-                clientSocketChannel.write( buff );
+                while ( buff.hasRemaining() )
+                {
+                    clientSocketChannel.write( buff ).get();
+                }
             }
         }
         catch ( URISyntaxException | InterruptedException e )