Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-233

Isolate unit tests

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None
    • None

    Description

      Running the unit tests for Wagon produced the attached Surefire report. Symptomatic is that the first test fails while all following raise errors. The Surefire report shows that this is due to

      BindException: Address already in use: JVM_Bind
      

      and indeed, I couldn't spot a call to tearDownWagonTestingFixtures() in case the test method was completed abnormally, so the previously started Jetty server is still hanging around when the next test tries to run.

      What about moving the tearDown*() methods into the usual tearDown() method invoked by JUnit? The alternative of using try/finally blocks everywhere might be cumbersome. Additionally, tear down should be fail-safe, e.g. a call like server.stop() would need to be guarded against server being null.

      Attachments

        Activity

          People

            olamy Olivier Lamy
            bentmann Benjamin Bentmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: