If you want to simulate expiration use the example I sent.
Another option is to use a mock.
On 07/06/2010 05:42 PM, Jeremy Davis wrote:
That seems to work, but it is approximately the same as zooKeeper.close() in
that there is no SessionExpired event that comes up through the default
Maybe I'm assuming more from ZK than I should, but should a paranoid lock
implementation periodically test it's session by reading or writing a value?
On Tue, Jul 6, 2010 at 10:32 AM, Mahadev Konar<maha...@yahoo-inc.com>wrote:
zk.disconnect() is the right way to disconnect from the servers. For
session expiration you just have to make sure that the client stays
disconnected for more than the session expiration interval.
Hope that helps.
On 7/6/10 9:09 AM, "Jeremy Davis"<jerdavis.cassan...@gmail.com> wrote:
Is there a recommended way of simulating a client session expiration in
I see a TestableZooKeeper.java, with a pauseCnxn() method that does cause
the connection to timeout/disconnect and reconnect. Is there an easy way
push this all the way through to session expiration?