Uploaded image for project: 'Maven Project Info Reports Plugin'
  1. Maven Project Info Reports Plugin
  2. MPIR-226

Tests should not run Jetty on default ports

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5
    • None
    • None
    • Windows 7, running a default Tomcat 6 installation on port 8080.

    Description

      ProjectInfoReportUtilsTest.testGetInputStreamURL() starts up a Jetty instance. The different tests communicate with Jetty on the ports 8080 and 8443. If someone, like me, is already running a web or servlet container on one of those (default) ports, the test will fail with the following output:

      Stacktrace
      
      java.net.BindException: Address already in use: bind
      	at sun.nio.ch.Net.bind(Native Method)
      	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
      	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
      	at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:211)
      	at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:309)
      	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      	at org.mortbay.jetty.Server.doStart(Server.java:228)
      	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      	at org.apache.maven.report.projectinfo.ProjectInfoReportUtilsTest.startJetty(ProjectInfoReportUtilsTest.java:235)
      	at org.apache.maven.report.projectinfo.ProjectInfoReportUtilsTest.testGetInputStreamURL(ProjectInfoReportUtilsTest.java:148)
      
      Standard Output
      
      @SLTests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.185 sec
      @SLRunning org.apache.maven.report.projectinfo.ProjectInfoReportUtilsTest
      

      It would be better to use some non default ports for the tests.

      Attachments

        Activity

          People

            hboutemy Herve Boutemy
            dennisl@apache.org Dennis Lundberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: