You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ca...@apache.org on 2016/06/14 22:22:50 UTC
[1/7] curator git commit: Back to 3.2.0-SNAPSHOT
Repository: curator
Updated Branches:
refs/heads/CURATOR-3.0 f830e5884 -> 31a824198
Back to 3.2.0-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/8ec66e2c
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/8ec66e2c
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/8ec66e2c
Branch: refs/heads/CURATOR-3.0
Commit: 8ec66e2ca4b9cbc546bef6e4eb44201042249b2f
Parents: d27a70c
Author: Cam McKenzie <ca...@apache.org>
Authored: Mon Jun 6 12:36:59 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Mon Jun 6 12:36:59 2016 +1000
----------------------------------------------------------------------
curator-client/pom.xml | 4 ++--
curator-examples/pom.xml | 2 +-
curator-framework/pom.xml | 4 ++--
curator-recipes/pom.xml | 4 ++--
curator-test/pom.xml | 4 ++--
curator-x-discovery-server/pom.xml | 4 ++--
curator-x-discovery/pom.xml | 4 ++--
curator-x-rpc/pom.xml | 4 ++--
pom.xml | 2 +-
9 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index 473f513..d9bcf11 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>curator-client</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Client</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index d66db10..cdbd960 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>curator-examples</artifactId>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index 1a65898..b48c138 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>curator-framework</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Framework</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index 0443adc..51e7f7a 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>curator-recipes</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Recipes</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 292135e..ef84d51 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>curator-test</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<name>Curator Testing</name>
<description>Unit testing utilities.</description>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 8766e9c..5c40a44 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>curator-x-discovery-server</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery Server</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index e2ded9a..43314c9 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<artifactId>curator-x-discovery</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 1ed88f8..09f53e1 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
<parent>
<artifactId>apache-curator</artifactId>
<groupId>org.apache.curator</groupId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>curator-x-rpc</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<name>Curator RPC Proxy</name>
<description>A proxy that bridges non-java environments with the Curator framework and recipes</description>
http://git-wip-us.apache.org/repos/asf/curator/blob/8ec66e2c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 905342c..01af38a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Curator</name>
[3/7] curator git commit: [maven-release-plugin] prepare for next
development iteration
Posted by ca...@apache.org.
[maven-release-plugin] prepare for next development iteration
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/bc1960f1
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/bc1960f1
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/bc1960f1
Branch: refs/heads/CURATOR-3.0
Commit: bc1960f13dc3cdc3ad2062385077637e139fc3e7
Parents: 93b1408
Author: Cam McKenzie <ca...@apache.org>
Authored: Mon Jun 6 12:38:02 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Mon Jun 6 12:38:02 2016 +1000
----------------------------------------------------------------------
curator-client/pom.xml | 4 ++--
curator-examples/pom.xml | 2 +-
curator-framework/pom.xml | 4 ++--
curator-recipes/pom.xml | 4 ++--
curator-test/pom.xml | 4 ++--
curator-x-discovery-server/pom.xml | 4 ++--
curator-x-discovery/pom.xml | 4 ++--
curator-x-rpc/pom.xml | 4 ++--
pom.xml | 2 +-
9 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index cbaea98..473f513 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<artifactId>curator-client</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Client</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index c3ea3fe..d66db10 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<artifactId>curator-examples</artifactId>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index a50e64d..1a65898 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<artifactId>curator-framework</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Framework</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index e42519b..0443adc 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<artifactId>curator-recipes</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Recipes</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index c357620..292135e 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<artifactId>curator-test</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<name>Curator Testing</name>
<description>Unit testing utilities.</description>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 5d06d2a..8766e9c 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<artifactId>curator-x-discovery-server</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery Server</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index 263569e..e2ded9a 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<artifactId>curator-x-discovery</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 5b83f07..1ed88f8 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
<parent>
<artifactId>apache-curator</artifactId>
<groupId>org.apache.curator</groupId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>curator-x-rpc</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<name>Curator RPC Proxy</name>
<description>A proxy that bridges non-java environments with the Curator framework and recipes</description>
http://git-wip-us.apache.org/repos/asf/curator/blob/bc1960f1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1bf80bc..905342c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Curator</name>
[6/7] curator git commit: # noissue - Updated LOST handling so that
the poll will only take 1/2 the session timeout if the SUSPENDED state has
not yet been reached. Reduced waiting time on semaphore test.
Posted by ca...@apache.org.
# noissue - Updated LOST handling so that the poll will only take 1/2 the session timeout if the SUSPENDED state has not yet been reached. Reduced waiting time on semaphore test.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/0559df58
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/0559df58
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/0559df58
Branch: refs/heads/CURATOR-3.0
Commit: 0559df588ca724540ba2f6e3f1889190586dd18e
Parents: ef36275
Author: Cam McKenzie <ca...@apache.org>
Authored: Tue Jun 14 14:12:15 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Tue Jun 14 14:12:15 2016 +1000
----------------------------------------------------------------------
.../org/apache/curator/framework/state/ConnectionStateManager.java | 2 +-
.../curator/framework/recipes/locks/TestInterProcessSemaphore.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/0559df58/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
index c420a12..56c2250 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
@@ -252,7 +252,7 @@ public class ConnectionStateManager implements Closeable
{
int lastNegotiatedSessionTimeoutMs = client.getZookeeperClient().getLastNegotiatedSessionTimeoutMs();
int useSessionTimeoutMs = (lastNegotiatedSessionTimeoutMs > 0) ? lastNegotiatedSessionTimeoutMs : sessionTimeoutMs;
- long elapsedMs = startOfSuspendedEpoch == 0 ? 0 : System.currentTimeMillis() - startOfSuspendedEpoch;
+ long elapsedMs = startOfSuspendedEpoch == 0 ? useSessionTimeoutMs / 2 : System.currentTimeMillis() - startOfSuspendedEpoch;
long pollMaxMs = useSessionTimeoutMs - elapsedMs;
final ConnectionState newState = eventQueue.poll(pollMaxMs, TimeUnit.MILLISECONDS);
http://git-wip-us.apache.org/repos/asf/curator/blob/0559df58/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
index 079b12c..488b776 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
@@ -150,7 +150,7 @@ public class TestInterProcessSemaphore extends BaseClassForTests
});
server.stop();
- Assert.assertTrue(timing.multiple(2).awaitLatch(lostLatch));
+ Assert.assertTrue(timing.multiple(1.25).awaitLatch(lostLatch));
InterProcessSemaphoreV2.debugAcquireLatch.countDown(); // the waiting semaphore proceeds to getChildren - which should fail
Assert.assertTrue(timing.awaitLatch(InterProcessSemaphoreV2.debugFailedGetChildrenLatch)); // wait until getChildren fails
[7/7] curator git commit: Merge branch 'CURATOR-3.0' of
https://git-wip-us.apache.org/repos/asf/curator into CURATOR-3.0
Posted by ca...@apache.org.
Merge branch 'CURATOR-3.0' of https://git-wip-us.apache.org/repos/asf/curator into CURATOR-3.0
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/31a82419
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/31a82419
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/31a82419
Branch: refs/heads/CURATOR-3.0
Commit: 31a824198a24cc0a681db5cc3fe1029cd6f823d2
Parents: 0559df5 f830e58
Author: Cam McKenzie <ca...@apache.org>
Authored: Wed Jun 15 08:21:29 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Wed Jun 15 08:21:29 2016 +1000
----------------------------------------------------------------------
.../curator/framework/api/ErrorListenerMultiTransactionMain.java | 2 +-
.../apache/curator/framework/imps/CuratorMultiTransactionImpl.java | 2 +-
.../java/org/apache/curator/framework/imps/SetDataBuilderImpl.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[4/7] curator git commit: #noissue - Added unit test with long
session timeout.
Posted by ca...@apache.org.
#noissue - Added unit test with long session timeout.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/1e07c779
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/1e07c779
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/1e07c779
Branch: refs/heads/CURATOR-3.0
Commit: 1e07c779a682b15a1b2c604c55f80dcdaa21aef2
Parents: bc1960f
Author: Cam McKenzie <ca...@apache.org>
Authored: Tue Jun 7 10:40:16 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Tue Jun 7 10:40:16 2016 +1000
----------------------------------------------------------------------
.../curator/framework/imps/TestFramework.java | 53 ++++++++++++++++++++
1 file changed, 53 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/1e07c779/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
index 5addcb7..7234088 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java
@@ -70,6 +70,59 @@ public class TestFramework extends BaseClassForTests
System.clearProperty("znode.container.checkIntervalMs");
super.teardown();
}
+
+ @Test
+ public void testSessionLossWithLongTimeout() throws Exception
+ {
+
+ final Timing timing = new Timing();
+ //Change this to TRUE and the test will pass.
+ System.setProperty("curator-use-classic-connection-handling", Boolean.FALSE.toString());
+
+ try(final CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), timing.forWaiting().milliseconds(),
+ timing.connection(), new RetryOneTime(1)))
+ {
+
+ final CountDownLatch connectedLatch = new CountDownLatch(1);
+ final CountDownLatch lostLatch = new CountDownLatch(1);
+ final CountDownLatch restartedLatch = new CountDownLatch(1);
+ client.getConnectionStateListenable().addListener(new ConnectionStateListener()
+ {
+ @Override
+ public void stateChanged(CuratorFramework client, ConnectionState newState)
+ {
+ if ( newState == ConnectionState.CONNECTED )
+ {
+ connectedLatch.countDown();
+ }
+ else if ( newState == ConnectionState.LOST )
+ {
+ lostLatch.countDown();
+ }
+ else if ( newState == ConnectionState.RECONNECTED )
+ {
+ restartedLatch.countDown();
+ }
+ }
+ });
+
+ client.start();
+
+ Assert.assertTrue(timing.awaitLatch(connectedLatch));
+
+ server.stop();
+
+ timing.sleepABit();
+ Assert.assertTrue(timing.awaitLatch(lostLatch));
+
+ server.restart();
+ Assert.assertTrue(timing.awaitLatch(restartedLatch));
+ }
+ finally
+ {
+ System.clearProperty("curator-use-classic-connection-handling");
+ }
+ }
@Test
public void testConnectionState() throws Exception
[5/7] curator git commit: #noissue - Modified connection state
handling so that the poll period when in a SUSPENDED state will match the
remaining amount of time left until the session expires,
rather than 2/3 of the session timeout. This will cause the
Posted by ca...@apache.org.
#noissue - Modified connection state handling so that the poll period when in a SUSPENDED state will match the remaining amount of time left until the session expires, rather than 2/3 of the session timeout. This will cause the LOST event to get triggered at the end of the session timeout window. Updated a few unit tests that were failing intermitently due to timing issues.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/ef362755
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/ef362755
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/ef362755
Branch: refs/heads/CURATOR-3.0
Commit: ef36275585fb883bb54db5a1396c58bb42b9b25b
Parents: 1e07c77
Author: Cam McKenzie <ca...@apache.org>
Authored: Tue Jun 14 13:49:07 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Tue Jun 14 13:49:07 2016 +1000
----------------------------------------------------------------------
.../apache/curator/framework/state/ConnectionStateManager.java | 4 +++-
.../apache/curator/framework/imps/TestFailedDeleteManager.java | 2 +-
.../framework/recipes/locks/TestInterProcessSemaphore.java | 5 ++---
3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/ef362755/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
index cbb8d16..c420a12 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
@@ -252,7 +252,9 @@ public class ConnectionStateManager implements Closeable
{
int lastNegotiatedSessionTimeoutMs = client.getZookeeperClient().getLastNegotiatedSessionTimeoutMs();
int useSessionTimeoutMs = (lastNegotiatedSessionTimeoutMs > 0) ? lastNegotiatedSessionTimeoutMs : sessionTimeoutMs;
- int pollMaxMs = (useSessionTimeoutMs * 2) / 3; // 2/3 of session timeout
+ long elapsedMs = startOfSuspendedEpoch == 0 ? 0 : System.currentTimeMillis() - startOfSuspendedEpoch;
+ long pollMaxMs = useSessionTimeoutMs - elapsedMs;
+
final ConnectionState newState = eventQueue.poll(pollMaxMs, TimeUnit.MILLISECONDS);
if ( newState != null )
{
http://git-wip-us.apache.org/repos/asf/curator/blob/ef362755/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
index 943529f..41b0bca 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFailedDeleteManager.java
@@ -140,7 +140,7 @@ public class TestFailedDeleteManager extends BaseClassForTests
client.delete().guaranteed().forPath("/test-me");
Assert.fail();
}
- catch ( KeeperException.ConnectionLossException e )
+ catch ( KeeperException.ConnectionLossException | KeeperException.SessionExpiredException e )
{
// expected
}
http://git-wip-us.apache.org/repos/asf/curator/blob/ef362755/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
index 7e821d0..079b12c 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
@@ -148,10 +148,9 @@ public class TestInterProcessSemaphore extends BaseClassForTests
}
}
});
-
- timing.sleepABit();
+
server.stop();
- Assert.assertTrue(timing.awaitLatch(lostLatch));
+ Assert.assertTrue(timing.multiple(2).awaitLatch(lostLatch));
InterProcessSemaphoreV2.debugAcquireLatch.countDown(); // the waiting semaphore proceeds to getChildren - which should fail
Assert.assertTrue(timing.awaitLatch(InterProcessSemaphoreV2.debugFailedGetChildrenLatch)); // wait until getChildren fails
[2/7] curator git commit: [maven-release-plugin] prepare release
apache-curator-3.2.0
Posted by ca...@apache.org.
[maven-release-plugin] prepare release apache-curator-3.2.0
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/93b14084
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/93b14084
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/93b14084
Branch: refs/heads/CURATOR-3.0
Commit: 93b140844f3fadae695fdf623f0e027ea5c4a1af
Parents: 8ec66e2
Author: Cam McKenzie <ca...@apache.org>
Authored: Mon Jun 6 12:37:52 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Mon Jun 6 12:37:52 2016 +1000
----------------------------------------------------------------------
curator-client/pom.xml | 4 ++--
curator-examples/pom.xml | 2 +-
curator-framework/pom.xml | 4 ++--
curator-recipes/pom.xml | 4 ++--
curator-test/pom.xml | 4 ++--
curator-x-discovery-server/pom.xml | 4 ++--
curator-x-discovery/pom.xml | 4 ++--
curator-x-rpc/pom.xml | 4 ++--
pom.xml | 2 +-
9 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index d9bcf11..cbaea98 100644
--- a/curator-client/pom.xml
+++ b/curator-client/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-client</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<packaging>bundle</packaging>
<name>Curator Client</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index cdbd960..c3ea3fe 100644
--- a/curator-examples/pom.xml
+++ b/curator-examples/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-examples</artifactId>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index b48c138..a50e64d 100644
--- a/curator-framework/pom.xml
+++ b/curator-framework/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-framework</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<packaging>bundle</packaging>
<name>Curator Framework</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index 51e7f7a..e42519b 100644
--- a/curator-recipes/pom.xml
+++ b/curator-recipes/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-recipes</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<packaging>bundle</packaging>
<name>Curator Recipes</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index ef84d51..c357620 100644
--- a/curator-test/pom.xml
+++ b/curator-test/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-test</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<name>Curator Testing</name>
<description>Unit testing utilities.</description>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 5c40a44..5d06d2a 100644
--- a/curator-x-discovery-server/pom.xml
+++ b/curator-x-discovery-server/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-x-discovery-server</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery Server</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index 43314c9..263569e 100644
--- a/curator-x-discovery/pom.xml
+++ b/curator-x-discovery/pom.xml
@@ -24,11 +24,11 @@
<parent>
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-x-discovery</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 09f53e1..5b83f07 100644
--- a/curator-x-rpc/pom.xml
+++ b/curator-x-rpc/pom.xml
@@ -22,12 +22,12 @@
<parent>
<artifactId>apache-curator</artifactId>
<groupId>org.apache.curator</groupId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>curator-x-rpc</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<name>Curator RPC Proxy</name>
<description>A proxy that bridges non-java environments with the Curator framework and recipes</description>
http://git-wip-us.apache.org/repos/asf/curator/blob/93b14084/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 01af38a..1bf80bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<packaging>pom</packaging>
<name>Apache Curator</name>