You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2015/09/11 05:38:03 UTC

curator git commit: test assumed first latch would be leader. Fixed it so that this is so

Repository: curator
Updated Branches:
  refs/heads/CURATOR-261 f8f13c25d -> a9271ff60


test assumed first latch would be leader. Fixed it so that this is so


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/a9271ff6
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/a9271ff6
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/a9271ff6

Branch: refs/heads/CURATOR-261
Commit: a9271ff6033557efeda01e4c543d0f840519e64d
Parents: f8f13c2
Author: randgalt <ra...@apache.org>
Authored: Thu Sep 10 22:37:57 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Thu Sep 10 22:37:57 2015 -0500

----------------------------------------------------------------------
 .../apache/curator/framework/recipes/leader/TestLeaderLatch.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/a9271ff6/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
index ecaa433..991e6fc 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatch.java
@@ -403,10 +403,9 @@ public class TestLeaderLatch extends BaseClassForTests
                 LeaderLatch latch = new LeaderLatch(client, PATH_NAME);
                 latch.start();
                 latches.add(latch);
+                waitForALeader(latches, timing);
             }
 
-            waitForALeader(latches, timing);
-
             //we need to close a Participant that doesn't be actual leader (first Participant) nor the last
             latches.get(PARTICIPANT_ID).close();