[
https://issues.apache.org/jira/browse/CURATOR-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14720393#comment-14720393
]
ASF GitHub Bot commented on CURATOR-253:
----------------------------------------
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;
/**
* <p>
- * Utility to simulate a ZK session dying. See: <a
href="http://wiki.apache.org/hadoop/ZooKeeper/FAQ#A4">ZooKeeper FAQ</a>
+ * Utility to simulate a ZK session dying.
* </p>
- *
- * <blockquote>
- * 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.
- * </blockquote>
*/
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?
> Use new injectSessionExpiration() in the test module
> ----------------------------------------------------
>
> Key: CURATOR-253
> URL: https://issues.apache.org/jira/browse/CURATOR-253
> Project: Apache Curator
> Issue Type: Sub-task
> Components: Tests
> Reporter: Jordan Zimmerman
> Assignee: Jordan Zimmerman
> Fix For: 3.0.0
>
>
> ZK 3.5.0 adds the Testable interface and the injectSessionExpiration()
> method. Curator's KillSession utils should use this instead of what's
> currently done.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)