db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: ok to add optional timeout/sleep property for junit framework?
Date Thu, 06 Dec 2007 19:30:33 GMT
Daniel John Debrunner wrote:
> Myrna van Lunteren wrote:
>>> Could this really be a bug, if the server doesn't start in over five
>>> minutes, even on a slow machine?
>>> Dan.
>> I guess it could be...But, wouldn't it just never come up, then?
> No idea, that's the definition of a bug, unexpected/unexplained 
> behaviour. :-)
> DERBY-2616 indicates the problem in a slow starting server might be due 
> to the tcp/ip state TIMED_WAIT. However the fix there was just to 
> increase the default wait time (which actually makes the tests run 
> slower). If TIMED_WAIT is the problem then tcp/ip and the Java Socket 
> api provides ways to get around it. Using the Socket.setReuseAddress() 
> call and SocketSessionConfig.setReuseAddress().
> Maybe the real fix to this issue is to use setReuseAddress() in some 
> way, maybe one or a combination of:
>   - provide a property to configure setReuseAddress for the server
>   - set that property in the decorator that starts the network server
>   - always set setReuseAddress(true) for localhost (unlikely to lose 
> network packets talking to localhost)
>   - always set setReuseAddress(true) (possibly a bad idea since 
> TIMED_WAIT is there for a reason but I haven't looked in enough detail)

More options:
     - Set setReuseAddress(true) on the server socket
     - Add a server property for setReuseAddress() on the server socker


View raw message