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 ABFA718718 for ; Fri, 28 Aug 2015 18:43:46 +0000 (UTC) Received: (qmail 26190 invoked by uid 500); 28 Aug 2015 18:43:46 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 26128 invoked by uid 500); 28 Aug 2015 18:43:46 -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 26115 invoked by uid 99); 28 Aug 2015 18:43:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2015 18:43:46 +0000 Date: Fri, 28 Aug 2015 18:43:46 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@curator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CURATOR-253) Use new injectSessionExpiration() in the test module MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)