eolivelli commented on a change in pull request #300:
URL: https://github.com/apache/maven-surefire/pull/300#discussion_r436259355



##########
File path: 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/spi/SurefireMasterProcessChannelProcessorFactory.java
##########
@@ -119,4 +129,23 @@ private final void setTrueOptions( 
SocketOption<Boolean>... options )
             }
         }
     }
+
+    private UUID parseAuth( URI uri )

Review comment:
       static ?

##########
File path: 
surefire-booter/src/test/java/org/apache/maven/surefire/booter/ForkedBooterMockTest.java
##########
@@ -362,6 +372,83 @@ public void run() throws Throwable
         }
     }
 
+    @Test
+    public void shouldAuthenticate() throws Exception
+    {
+        mockStatic( ForkedBooter.class );
+
+        doCallRealMethod()
+            .when( ForkedBooter.class, "lookupDecoderFactory", anyString() );
+
+        try ( final ServerSocketChannel server = ServerSocketChannel.open() )
+        {
+            if ( server.supportedOptions().contains( SO_REUSEADDR ) )
+            {
+                server.setOption( SO_REUSEADDR, true );
+            }
+
+            if ( server.supportedOptions().contains( TCP_NODELAY ) )
+            {
+                server.setOption( TCP_NODELAY, true );
+            }
+
+            if ( server.supportedOptions().contains( SO_KEEPALIVE ) )

Review comment:
       IMO you don't need these options in a test

##########
File path: 
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
##########
@@ -113,6 +124,25 @@ public void connectToClient() throws IOException
         }
     }
 
+    private void authenticate() throws InterruptedException, 
ExecutionException, IOException
+    {
+        ByteBuffer hash = ByteBuffer.allocate( UUID_STRING_LENGTH );

Review comment:
       Why 'hash' ?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to