curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-253) Use new injectSessionExpiration() in the test module
Date Fri, 28 Aug 2015 18:50:45 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14720398#comment-14720398
] 

ASF GitHub Bot commented on CURATOR-253:
----------------------------------------

Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/100#discussion_r38231696
  
    --- 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 --
    
    Yeah, probably a good thing. I'll add it.


> 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)

Mime
View raw message