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



##########
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 ) )
+            {
+                server.setOption( SO_KEEPALIVE, true );
+            }
+
+            server.bind( new InetSocketAddress( 0 ) );
+            int serverPort = ( (InetSocketAddress) server.getLocalAddress() 
).getPort();
+            final UUID uuid = UUID.randomUUID();
+            String url = "tcp://127.0.0.1:" + serverPort + "?auth=" + uuid;

Review comment:
       This is in current branch. So the change must be done in here.




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