Re: Simulating failures?
Here's how to test session expiration (haven't tried this in a while): http://github.com/phunt/zkexamples It would be great to have some test infrastructure/examples/docs/strategies available for developers (zk client users). If someone would be interested to workon/contribute this we'd be pretty psyched to work with you on it. Patrick On 06/04/2010 11:28 AM, Stephen Green wrote: Now that I've got things working pretty smoothly with my ZooKeeper setup in normal operation, I'd like to test some of the recovery stuff that I've put into my application. I'd like to make sure that if a connection to ZK fails, then my application recovers appropriately (possibly by giving up). Obviously I could do some of this by shutting off the server and restarting it, but I'd like to be a bit more systematic, if possible. Is there any way to inject failures into the ZK client so that I can test without having to randomly kill servers/clients? Thanks, Steve
Re: Simulating failures?
I use mock objects to create a simulated ZK object. Alternatively, you may be able to sub-class and delegate all ZK calls. That would let you inject faults. On Fri, Jun 4, 2010 at 11:28 AM, Stephen Green wrote: > Is there any way to inject failures into the ZK client so that I can > test without having to randomly kill servers/clients? >
Simulating failures?
Now that I've got things working pretty smoothly with my ZooKeeper setup in normal operation, I'd like to test some of the recovery stuff that I've put into my application. I'd like to make sure that if a connection to ZK fails, then my application recovers appropriately (possibly by giving up). Obviously I could do some of this by shutting off the server and restarting it, but I'd like to be a bit more systematic, if possible. Is there any way to inject failures into the ZK client so that I can test without having to randomly kill servers/clients? Thanks, Steve -- Stephen Green http://thesearchguy.wordpress.com
Re: Ping and client session timeouts
On Sat, May 22, 2010 at 12:38 AM, Ted Dunning wrote: > You may actually be swapping. That can be even worse than GC! Just to close the loop on this one, the problem was indeed GC: not only was I running 1200 threads, I had a vicious memory leak too. Good times. Thanks for the help on that one, folks. Steve -- Stephen Green http://thesearchguy.wordpress.com