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:43:46 GMT

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

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_r38230977
  
    --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
---
    @@ -111,11 +112,26 @@ public void stateChanged(CuratorFramework client, ConnectionState
newState)
             {
                 if ( newState == ConnectionState.RECONNECTED )
                 {
    +                if ( debugReconnectLatch != null )
    +                {
    +                    try
    +                    {
    +                        debugReconnectLatch.await();
    +                    }
    +                    catch ( InterruptedException e )
    +                    {
    +                        Thread.currentThread().interrupt();
    +                        e.printStackTrace();
    +                    }
    +                }
                     createNode();
                 }
             }
         };
     
    +    @VisibleForTesting
    +    volatile CountDownLatch debugReconnectLatch = null;
    --- End diff --
    
    Why does this need to be volatile?


> 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