It isn't exactly an answer to your question, but sometimes you can start the
server with a @BeforeClass setup and then use a @Before setup to delete
everything before each test.  This doesn't avoid your problem, but it does
minimize it because you don't have to restart servers soooo often.

On Thu, Oct 22, 2009 at 5:29 PM, Mahadev Konar <maha...@yahoo-inc.com>wrote:

> Hi Siddharth,
>  Usually the time of releasing the port is dependent on the OS. So you can
> try sleeping a few more seconds to see if the port has been released or it
> .. Or just poll on the port to see if its in use or not.... There isnt an
> easier way to restart on the same port.
>
>
> mahadev
>
>
> On 10/22/09 4:52 PM, "Siddharth Raghavan" <siddhar...@audiencescience.com>
> wrote:
>
> > Hello,
> >
> >
> >
> > I need to restart a single zookeeper server node on the same port within
> > my unit tests.
> >
> >
> >
> > I tried stopping the server, having a delay and restarting it on the
> > same port. But the server doesn't startup. When I re-start on a
> > different port, it starts up correctly.
> >
> >
> >
> > Can you let me know how I can make this one work.
> >
> >
> >
> > Thank you.
> >
> >
> >
> > Regards,
> >
> > Siddharth
> >
> >
> >
>
>


-- 
Ted Dunning, CTO
DeepDyve

Reply via email to