You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/07/31 10:07:27 UTC

[jira] Created: (WAGON-233) Isolate unit tests

Isolate unit tests
------------------

                 Key: WAGON-233
                 URL: http://jira.codehaus.org/browse/WAGON-233
             Project: Maven Wagon
          Issue Type: Task
            Reporter: Benjamin Bentmann
         Attachments: org.apache.maven.wagon.providers.http.LightweightHttpsWagonTest.txt

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
{noformat}
BindException: Address already in use: JVM_Bind
{noformat}
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}}.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-233) Isolate unit tests

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated WAGON-233:
-------------------------------

    Fix Version/s: 1.x

> Isolate unit tests
> ------------------
>
>                 Key: WAGON-233
>                 URL: http://jira.codehaus.org/browse/WAGON-233
>             Project: Maven Wagon
>          Issue Type: Task
>            Reporter: Benjamin Bentmann
>             Fix For: 1.x
>
>         Attachments: org.apache.maven.wagon.providers.http.LightweightHttpsWagonTest.txt
>
>
> 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
> {noformat}
> BindException: Address already in use: JVM_Bind
> {noformat}
> 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}}.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (WAGON-233) Isolate unit tests

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/WAGON-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed WAGON-233.
------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.1)
                   2.0
         Assignee: Olivier Lamy

unit tests in 2.0 use a random http port.

> Isolate unit tests
> ------------------
>
>                 Key: WAGON-233
>                 URL: https://jira.codehaus.org/browse/WAGON-233
>             Project: Maven Wagon
>          Issue Type: Task
>            Reporter: Benjamin Bentmann
>            Assignee: Olivier Lamy
>             Fix For: 2.0
>
>         Attachments: org.apache.maven.wagon.providers.http.LightweightHttpsWagonTest.txt
>
>
> 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
> {noformat}
> BindException: Address already in use: JVM_Bind
> {noformat}
> 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}}.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira