Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E80159756 for ; Sat, 17 Mar 2012 15:57:46 +0000 (UTC) Received: (qmail 67713 invoked by uid 500); 17 Mar 2012 15:57:46 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 67618 invoked by uid 500); 17 Mar 2012 15:57:45 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 67608 invoked by uid 99); 17 Mar 2012 15:57:45 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Mar 2012 15:57:45 +0000 Received: from localhost (HELO mail-we0-f170.google.com) (127.0.0.1) (smtp-auth username phunt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Mar 2012 15:57:45 +0000 Received: by werh12 with SMTP id h12so5178309wer.15 for ; Sat, 17 Mar 2012 08:57:43 -0700 (PDT) Received: by 10.180.107.101 with SMTP id hb5mr3428284wib.3.1331999863625; Sat, 17 Mar 2012 08:57:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.24.201 with HTTP; Sat, 17 Mar 2012 08:57:23 -0700 (PDT) In-Reply-To: <1000904361.1066501.1331833275163.JavaMail.mail@webmail19> References: <523403982.1030178.1331748249626.JavaMail.mail@webmail19> <2111004619.1065742.1331832213012.JavaMail.mail@webmail19> <1000904361.1066501.1331833275163.JavaMail.mail@webmail19> From: Patrick Hunt Date: Sat, 17 Mar 2012 08:57:23 -0700 Message-ID: Subject: Re: Forcing DISCONNECTED event? To: user@zookeeper.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Mar 15, 2012 at 10:41 AM, JL wrote: > On Mar 15, 2012, JL wrote: > > Thanks Patrick. > >> This is the c client? (In java I know we have a zk subclass that provide= s this.) > > This is Java. =A0Could you point me to the ZK subclass that provides this= functionality? =A0I may or may not be able to use it without tearing thing= s apart too much as I am using ZK through Curator. > org.apache.zookeeper.TestableZooKeeper.testableConnloss() >> Perhaps an easier way would be to simulate Server failure - =A0e.g. star= t a quroum of 3 servers, Have your client connect, then shutdown the server= that the client connected to. The client will be disconnected and reconnec= t to one of the remaining 2 servers. > > The 3-server quorom approach seems like the way to go for us, as we can e= asily set up a ZK cluster for testing (thanks again to curator-test). =A0I'= ll give that a try. > That's what we often do in zk testing itself. It better simulates what happens in the real world. Curator is the bees knees. > > Thanks for the quick response, NP. Regards. Patrick