You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/08/15 13:11:48 UTC

[GitHub] [maven-integration-testing] Tibor17 commented on a change in pull request #46: [MNG-6731] Jetty getLocalPort() returns -1 resulting in build failures

Tibor17 commented on a change in pull request #46: [MNG-6731] Jetty getLocalPort() returns -1 resulting in build failures
URL: https://github.com/apache/maven-integration-testing/pull/46#discussion_r314300317
 
 

 ##########
 File path: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0553SettingsAuthzEncryptionTest.java
 ##########
 @@ -86,18 +93,13 @@ protected void setUp()
         handlerList.addHandler( repoHandler );
         handlerList.addHandler( new DefaultHandler() );
 
-        server = new Server( 0 );
         server.setHandler( handlerList );
         server.start();
-        while ( !server.isRunning() || !server.isStarted() )
+        if ( server.isFailed() )
 
 Review comment:
   because this has a purpose. I want to catch all errors. Not only IOException.
   ```
       @Override
       public final void start() throws Exception
       {
           synchronized (_lock)
           {
               try
               {
                   if (_state == __STARTED || _state == __STARTING)
                       return;
                   setStarting();
                   doStart();
                   setStarted();
               }
               catch (Throwable e)
               {
                   setFailed(e);
                   throw e;
               }
           }
       }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services