Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D46B18736 for ; Fri, 28 Aug 2015 18:46:22 +0000 (UTC) Received: (qmail 31786 invoked by uid 500); 28 Aug 2015 18:46:22 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 31736 invoked by uid 500); 28 Aug 2015 18:46:22 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 31720 invoked by uid 99); 28 Aug 2015 18:46:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2015 18:46:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E2C6DDFDCF; Fri, 28 Aug 2015 18:46:21 +0000 (UTC) From: madrob To: dev@curator.apache.org Reply-To: dev@curator.apache.org References: In-Reply-To: Subject: [GitHub] curator pull request: [CURATOR-253] Use new injectSessionExpiratio... Content-Type: text/plain Message-Id: <20150828184621.E2C6DDFDCF@git1-us-west.apache.org> Date: Fri, 28 Aug 2015 18:46:21 +0000 (UTC) Github user madrob commented on a diff in the pull request: https://github.com/apache/curator/pull/100#discussion_r38231256 --- Diff: curator-test/src/main/java/org/apache/curator/test/KillSession.java --- @@ -18,24 +18,12 @@ */ package org.apache.curator.test; -import org.apache.zookeeper.WatchedEvent; -import org.apache.zookeeper.Watcher; import org.apache.zookeeper.ZooKeeper; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; /** *

- * Utility to simulate a ZK session dying. See: ZooKeeper FAQ + * Utility to simulate a ZK session dying. *

- * - *
- * 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. - *
*/ public class KillSession --- End diff -- New method suggestion: KillSession::kill(CuratorFramework) and that can extract the zookeeper bits on it's own. More robust for future improvement, maybe? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---