zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Hunt <ph...@apache.org>
Subject Re: Suggested way to simulate client session expiration in unit tests?
Date Tue, 06 Jul 2010 17:51:35 GMT
not sure if this still works but here's an example:

http://github.com/phunt/zkexamples

Patrick

On 07/06/2010 10:32 AM, Mahadev Konar wrote:
> Hi Jeremy,
>
>   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.
>
> Thanks
> mahadev
>
>
> On 7/6/10 9:09 AM, "Jeremy Davis"<jerdavis.cassandra@gmail.com>  wrote:
>
>> Is there a recommended way of simulating a client session expiration in unit
>> tests?
>> I see a TestableZooKeeper.java, with a pauseCnxn() method that does cause
>> the connection to timeout/disconnect and reconnect. Is there an easy way to
>> push this all the way through to session expiration?
>> Thanks,
>> -JD
>

Mime
View raw message