> -----Original Message-----
> From: Andrew Zhang [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 25, 2006 6:11 AM
> To: harmony-dev@incubator.apache.org; [EMAIL PROTECTED]
> Subject: Re: [classlib] jetty based tests
> 
> On 5/25/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Yang Paulex wrote:
> > > +1 from me
> > >
> > > I also suggest we use Jetty as a singleton,  so that we 
> don't need to
> > pay
> > > the overhead to find an available port and to start http server.
> >
> > Doesn't the above "don't need to pay the overhead to find 
> an available
> > port" conflict with the element #1 below, "lazily start Jetty when
> > necessary on an available port"
> 
> 
> I don't think "singleton" conflicts with "lazily start".
> Jetty server starts only once and starts up when there's some 
> case needs it.
> :)

Right - my confusion was about not wanting to find an available port due
to some overhead that you discern.

> 
> Sorry - I'm just confused.
> >
> > (I think that the port should be pre defined (well-known) 
> have a default
> > value, and be overridable in a properties/-ish file.
> 
> 
> What's the problem if the port is selected automatically?

Repeatability.  IMO, there should be no random elements in our testing.
That leads to frustration, fear, despair, pathos, pain, agony, angst and
much pulling of limited resources, like hair, in my case.


> If I understand correctly, it means Jetty selects a free port 
> from system,
> and provides an API method (e.g. getJettyPort()) to get the 
> selected port.
> In this way,  listen port confliction issue could be 
> completely avoided.

Only once in my life have I seen a server randomly choose a port to
listen on, and I quickly took that engineer off networking projects for
a while :)

Geir

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to