Are you sure serviceZKSessionId is valid? -Flavio
> On 13 Apr 2016, at 08:39, Matteo Casadei - Diennea > <[email protected]> wrote: > > Hi everybody, > > I have an issue on testing ZooKeeper's session expiration. > > Basically, I am using the chunk of code below to make a "target" > ZooKeeper handle expire: > > > ... > final ZooKeeper zk = new ZooKeeper(zkAddress , zkTimeout, new Watcher() { > > @Override > public void process(WatchedEvent event) { > System.out.println("Received event: " + event); > > } > > }, serviceZKSessionId, serviceZKpasswd); > > while (zk.getState() != States.CONNECTED) { > Thread.sleep(100); > } > zk.close(); > ... > > > however when running the code above, the only event a receive is an expired > event while the target ZooKeeper handle (the one I want to actually expire) > simply gets disconnected and immediately reconnected afterwards. > > Can anybody give me a clue on what is actually wrong with this code? > > > Thanks in advance, > Matteo > > -- > Matteo Casadei > > ________________________________ > > Iscriviti alla nostra newsletter per rimanere aggiornato su digital ed email > marketing! http://www.magnews.it/newsletter/ > > The information in this email is confidential and may be legally privileged. > If you are not the intended recipient please notify the sender immediately > and destroy this email. Any unauthorized, direct or indirect, disclosure, > copying, storage, distribution or other use is strictly forbidden.
