What if Dumbster gets given a bad port number by commons email?

Did you just mean the timeout checks?

If so, can we just replace:
            this.fakeMailServer =
                SimpleSmtpServer.start(EmailConfiguration.MAIL_SERVER_PORT);

            Date dtStartWait = new Date();
            while (this.fakeMailServer.isStopped())
            {
                // test for connected
                if (this.fakeMailServer != null
                    && !this.fakeMailServer.isStopped())
                {
                    break;
                }

                // test for timeout
                if ((dtStartWait.getTime() + EmailConfiguration.TIME_OUT)
                    <= new Date().getTime())
                {
                    fail("Mail server failed to start");
                }
            }

with:
            this.fakeMailServer =
                SimpleSmtpServer.start(EmailConfiguration.MAIL_SERVER_PORT);
             if (this.fakeMailServer.isStopped())  fail("Mail server
failed to start");

?

On 6/27/05, Ramiro Pereira de Magalhaes <[EMAIL PROTECTED]> wrote:
> Ramiro Pereira de Magalhaes wrote:
> 
> > [EMAIL PROTECTED] wrote:
> >
> >> Author: dion
> >> Date: Sat Jun 25 04:48:51 2005
> >> New Revision: 201739
> >>
> >> URL: http://svn.apache.org/viewcvs?rev=201739&view=rev
> >> Log:
> >> Move to dumbster 1.6 for testing:
> >> - jdk13 compatible
> >> - faster
> >> - still works for us
> >>
> >> Modified:
> >>    jakarta/commons/proper/email/trunk/project.xml
> >>
> >> Modified: jakarta/commons/proper/email/trunk/project.xml
> >> URL:
> >> http://svn.apache.org/viewcvs/jakarta/commons/proper/email/trunk/project.xml?rev=201739&r1=201738&r2=201739&view=diff
> >>
> >> ==============================================================================
> >>
> >> --- jakarta/commons/proper/email/trunk/project.xml (original)
> >> +++ jakarta/commons/proper/email/trunk/project.xml Sat Jun 25
> >> 04:48:51 2005
> >> @@ -152,7 +152,7 @@
> >>         <dependency>
> >>             <groupId>dumbster</groupId>
> >>             <artifactId>dumbster</artifactId>
> >> -            <version>1.5</version>
> >> +            <version>1.6</version>
> >>             <properties/>
> >>         </dependency>
> >>     </dependencies>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> > If you're using dumbster version 1.6 then check it out from CVS and
> > build it. There is a small but important difference between the code
> > on CVS and the code currently released that avoids some locks while
> > starting a SimpleSmtpServer. Check the difference here:
> > http://cvs.sourceforge.net/viewcvs.py/dumbster/dumbster/src/com/dumbster/smtp/SimpleSmtpServer.java?r1=1.7&r2=1.8
> >
> >
> > Ramiro Pereira de Magalhães
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> I forgot to say that the getMailServer() method on BaseEmailTestCase
> class performs unnecessary checks in order to be sure that dumbster mail
> server's up. Dumbster itself takes care of it.
> 
> Ramiro Pereira de Magalhães
> 
> 
> 
> 
> _______________________________________________________
> Yahoo! Acesso Gr�tis - Internet r�pida e gr�tis.
> Instale o discador agora! http://br.acesso.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
http://www.multitask.com.au/people/dion/
"You are going to let the fear of poverty govern your life and your
reward will be that you will eat, but you will not live." - George
Bernard Shaw

Reply via email to