Restarting a single zookeeper Server on the same port within the process

2009-10-22 Thread Siddharth Raghavan
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

Re: Restarting a single zookeeper Server on the same port within the process

2009-10-22 Thread Mahadev Konar
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

Re: Restarting a single zookeeper Server on the same port within the process

2009-10-22 Thread Ted Dunning
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 s often. On

Re: Restarting a single zookeeper Server on the same port within the process

2009-10-22 Thread Patrick Hunt
Siddharth Raghavan wrote: I need to restart a single zookeeper server node on the same port within my unit tests. Are you testing c or java client? 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