curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [2/7] git commit: Use a more reasonable retry for better test reliability
Date Sun, 10 Nov 2013 02:48:10 GMT
Use a more reasonable retry for better test reliability


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

Branch: refs/heads/CURATOR-72
Commit: ad033cf1397c84f9c9f530bb9e877faaf693aa17
Parents: aea4dd8
Author: randgalt <randgalt@apache.org>
Authored: Sat Nov 9 18:43:45 2013 -0800
Committer: randgalt <randgalt@apache.org>
Committed: Sat Nov 9 18:43:45 2013 -0800

----------------------------------------------------------------------
 .../curator/framework/recipes/leader/TestLeaderLatchCluster.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/ad033cf1/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
index bcb2ac4..90ec122 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderLatchCluster.java
@@ -22,6 +22,7 @@ import com.google.common.collect.Lists;
 import com.google.common.io.Closeables;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.retry.ExponentialBackoffRetry;
 import org.apache.curator.retry.RetryOneTime;
 import org.apache.curator.test.InstanceSpec;
 import org.apache.curator.test.TestingCluster;
@@ -64,7 +65,7 @@ public class TestLeaderLatchCluster
             List<InstanceSpec>      instances = Lists.newArrayList(cluster.getInstances());
             for ( int i = 0; i < PARTICIPANT_QTY; ++i )
             {
-                CuratorFramework        client = CuratorFrameworkFactory.newClient(instances.get(i).getConnectString(),
timing.session(), timing.connection(), new RetryOneTime(1));
+                CuratorFramework        client = CuratorFrameworkFactory.newClient(instances.get(i).getConnectString(),
timing.session(), timing.connection(), new ExponentialBackoffRetry(100, 3));
                 LeaderLatch             latch = new LeaderLatch(client, "/latch");
 
                 clients.add(new ClientAndLatch(client, latch, i));


Mime
View raw message