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/08 19:23:03 UTC
[1/3] curator git commit: Removed unnecessary size check
Repository: curator
Updated Branches:
refs/heads/CURATOR-3.0 7aa371e95 -> b161867c1
Removed unnecessary size check
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/2e8f2528
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/2e8f2528
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/2e8f2528
Branch: refs/heads/CURATOR-3.0
Commit: 2e8f2528c57b0b4f1d61f5698e443f9f2d03f559
Parents: 7aa371e
Author: randgalt <ra...@apache.org>
Authored: Tue Sep 8 11:46:26 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Tue Sep 8 11:46:26 2015 -0500
----------------------------------------------------------------------
.../src/main/java/org/apache/curator/SessionFailRetryLoop.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/2e8f2528/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java b/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
index 8647952..ed0fe2e 100644
--- a/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
+++ b/curator-client/src/main/java/org/apache/curator/SessionFailRetryLoop.java
@@ -179,7 +179,7 @@ public class SessionFailRetryLoop implements Closeable
static boolean sessionForThreadHasFailed()
{
- return (failedSessionThreads.size() > 0) && failedSessionThreads.contains(Thread.currentThread());
+ return failedSessionThreads.contains(Thread.currentThread());
}
/**
[2/3] curator git commit: Need some time after killing session now
that it happens almost immediately
Posted by ra...@apache.org.
Need some time after killing session now that it happens almost immediately
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/d5b0d0d5
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/d5b0d0d5
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/d5b0d0d5
Branch: refs/heads/CURATOR-3.0
Commit: d5b0d0d523a5e84f4760a0a6e26738a2fce11642
Parents: 2e8f252
Author: randgalt <ra...@apache.org>
Authored: Tue Sep 8 11:46:51 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Tue Sep 8 11:46:51 2015 -0500
----------------------------------------------------------------------
.../test/java/org/apache/curator/TestSessionFailRetryLoop.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/d5b0d0d5/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java b/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
index 937726e..b33939f 100644
--- a/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
+++ b/curator-client/src/test/java/org/apache/curator/TestSessionFailRetryLoop.java
@@ -175,7 +175,7 @@ public class TestSessionFailRetryLoop extends BaseClassForTests
@Test
public void testBasic() throws Exception
{
- Timing timing = new Timing();
+ final Timing timing = new Timing();
final CuratorZookeeperClient client = new CuratorZookeeperClient(server.getConnectString(), timing.session(), timing.connection(), null, new ExponentialBackoffRetry(100, 3));
SessionFailRetryLoop retryLoop = client.newSessionFailRetryLoop(SessionFailRetryLoop.Mode.FAIL);
retryLoop.start();
@@ -199,6 +199,8 @@ public class TestSessionFailRetryLoop extends BaseClassForTests
Assert.assertNull(client.getZooKeeper().exists("/foo/bar", false));
KillSession.kill(client.getZooKeeper(), server.getConnectString());
+ timing.sleepABit();
+
client.getZooKeeper();
client.blockUntilConnectedOrTimedOut();
Assert.assertNull(client.getZooKeeper().exists("/foo/bar", false));
[3/3] curator git commit: Killed sessions now go directly to LOST (as
they should)
Posted by ra...@apache.org.
Killed sessions now go directly to LOST (as they should)
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/b161867c
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/b161867c
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/b161867c
Branch: refs/heads/CURATOR-3.0
Commit: b161867c1db03c279be0c0ce1eb091bb3372811d
Parents: d5b0d0d
Author: randgalt <ra...@apache.org>
Authored: Tue Sep 8 11:47:19 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Tue Sep 8 11:47:19 2015 -0500
----------------------------------------------------------------------
.../curator/framework/imps/TestEnabledSessionExpiredState.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/b161867c/curator-framework/src/test/java/org/apache/curator/framework/imps/TestEnabledSessionExpiredState.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestEnabledSessionExpiredState.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestEnabledSessionExpiredState.java
index 490e75e..7114e48 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestEnabledSessionExpiredState.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestEnabledSessionExpiredState.java
@@ -124,8 +124,7 @@ public class TestEnabledSessionExpiredState extends BaseClassForTests
KillSession.kill(client.getZookeeperClient().getZooKeeper(), server.getConnectString());
- Assert.assertEquals(states.poll(timing.milliseconds(), TimeUnit.MILLISECONDS), ConnectionState.SUSPENDED);
- Assert.assertEquals(states.poll(timing.milliseconds(), TimeUnit.MILLISECONDS), ConnectionState.LOST);
+ Assert.assertEquals(states.poll(timing.forSessionSleep().milliseconds(), TimeUnit.MILLISECONDS), ConnectionState.LOST);
Assert.assertEquals(states.poll(timing.milliseconds(), TimeUnit.MILLISECONDS), ConnectionState.RECONNECTED);
}