public class KillSession extends Object
Utility to simulate a ZK session dying. See: ZooKeeper FAQ
In the case of testing we want to cause a problem, so to explicitly expire a session an application connects to ZooKeeper, saves the session id and password, creates another ZooKeeper handle with that id and password, and then closes the new handle. Since both handles reference the same session, the close on second handle will invalidate the session causing a SESSION_EXPIRED on the first handle.
Constructor and Description |
---|
KillSession() |
Copyright © 2011–2013 The Apache Software Foundation. All rights reserved.