DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24072>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24072

Failure to start jetty prevents subsequent jetty tests from running

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From [EMAIL PROTECTED]  2003-10-27 08:38 -------
Hi James,

Thanks for this bug report. I've applied your patch but slightly modified. I 
have overriden the run() method as follows:

    public void run(final TestResult theResult)
    {
        Protectable p = new Protectable()
        {
            public void protect() throws Exception
            {
                try
                {
                    setUp();
                    basicRun(theResult);
                }
                finally
                {
                    tearDown();
                }
            }
        };
        theResult.runProtected(this, p);
    }  

And I have modified the tearDown method as follows:

    protected void tearDown() throws Exception
    { 
        if (this.server != null)
        { 
            // First, verify if the server is running
            boolean started = ((Boolean) server.getClass().getMethod(
                "isStarted", null).invoke(this.server, null)).booleanValue(); 

            // Stop the Jetty server, if started
            if (started)
            {
                this.server.getClass().getMethod("stop", null).invoke(
                    this.server, null);
            }
        } 
    }


I'll be testing this over the week.

Thanks
-Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to