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/02 02:06:36 UTC
[1/3] curator git commit: Back to 3.1.0-SNAPSHOT
Repository: curator
Updated Branches:
refs/heads/interprocess_mutex_issue [created] 92dbba799
Back to 3.1.0-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/b7c68f6f
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/b7c68f6f
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/b7c68f6f
Branch: refs/heads/interprocess_mutex_issue
Commit: b7c68f6f30f5474c3cc9a6958fdc011770da120e
Parents: e2200da
Author: Cam McKenzie <ca...@apache.org>
Authored: Wed Jun 1 11:45:26 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Wed Jun 1 11:45:26 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 | 4 ++--
9 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index 473f513..357d2d2 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.1.0-SNAPSHOT</version>
</parent>
<artifactId>curator-client</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Client</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index d66db10..d5fb9ea 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.1.0-SNAPSHOT</version>
</parent>
<artifactId>curator-examples</artifactId>
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index 1a65898..a560365 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.1.0-SNAPSHOT</version>
</parent>
<artifactId>curator-framework</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Framework</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index 0443adc..44e9f6b 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.1.0-SNAPSHOT</version>
</parent>
<artifactId>curator-recipes</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Recipes</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 292135e..301ccef 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.1.0-SNAPSHOT</version>
</parent>
<artifactId>curator-test</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<name>Curator Testing</name>
<description>Unit testing utilities.</description>
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index 8766e9c..a88b68c 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.1.0-SNAPSHOT</version>
</parent>
<artifactId>curator-x-discovery-server</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery Server</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index e2ded9a..62e7ebe 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.1.0-SNAPSHOT</version>
</parent>
<artifactId>curator-x-discovery</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Curator Service Discovery</name>
http://git-wip-us.apache.org/repos/asf/curator/blob/b7c68f6f/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 1ed88f8..68c7959 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.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>curator-x-rpc</artifactId>
- <version>3.2.1-SNAPSHOT</version>
+ <version>3.1.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/b7c68f6f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 384b310..2e0fc99 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.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Curator</name>
@@ -96,7 +96,7 @@
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/curator.git
</developerConnection>
- <tag>HEAD</tag>
+ <tag>apache-curator-3.2.0</tag>
</scm>
<issueManagement>
[3/3] curator git commit: #noissue - Test case for interprocess mutex
not reconnecting.
Posted by ca...@apache.org.
#noissue - Test case for interprocess mutex not reconnecting.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/92dbba79
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/92dbba79
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/92dbba79
Branch: refs/heads/interprocess_mutex_issue
Commit: 92dbba79904dc362c124caba25dc87eebcc92040
Parents: e7fa01c
Author: Cam McKenzie <ca...@apache.org>
Authored: Thu Jun 2 11:57:47 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Thu Jun 2 11:57:47 2016 +1000
----------------------------------------------------------------------
.../TestInterProcessMutexNotReconnecting.java | 147 +++++++++++++++++++
1 file changed, 147 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/92dbba79/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexNotReconnecting.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexNotReconnecting.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexNotReconnecting.java
new file mode 100755
index 0000000..87468bd
--- /dev/null
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexNotReconnecting.java
@@ -0,0 +1,147 @@
+package org.apache.curator.framework.recipes.locks;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.state.ConnectionState;
+import org.apache.curator.framework.state.ConnectionStateListener;
+import org.apache.curator.retry.RetryOneTime;
+import org.apache.curator.test.BaseClassForTests;
+import org.apache.curator.utils.CloseableUtils;
+import org.apache.zookeeper.KeeperException;
+import org.testng.Assert;
+
+public class TestInterProcessMutexNotReconnecting extends BaseClassForTests
+{
+ @org.testng.annotations.Test
+ public void test() throws Exception
+ {
+ final String SEMAPHORE_PATH = "/test";
+ final int MAX_SEMAPHORES = 1;
+ final int NUM_CLIENTS = 10;
+
+ server.start();
+
+ CuratorFramework client = null;
+
+ ExecutorService executor = Executors.newFixedThreadPool(NUM_CLIENTS);
+
+ final AtomicInteger counter = new AtomicInteger(0);
+ final AtomicBoolean run = new AtomicBoolean(true);
+
+ try {
+ client = CuratorFrameworkFactory.newClient(server.getConnectString(), 5000, 5000, new RetryOneTime(1));
+ client.start();
+
+ final CuratorFramework lClient = client;
+
+ for(int i = 0; i < NUM_CLIENTS; ++i)
+ {
+ executor.execute(new Runnable()
+ {
+
+ @Override
+ public void run()
+ {
+ while(run.get())
+ {
+ InterProcessSemaphoreV2 semaphore = new InterProcessSemaphoreV2(lClient, SEMAPHORE_PATH, MAX_SEMAPHORES);
+ System.err.println(Thread.currentThread() + "Acquiring");
+ Lease lease = null;
+ try
+ {
+ lease = semaphore.acquire();
+ System.err.println(Thread.currentThread() + "Acquired");
+ counter.incrementAndGet();
+ Thread.sleep(2000);
+ }
+ catch(InterruptedException e)
+ {
+ System.err.println("Interrupted");
+ Thread.currentThread().interrupt();
+ break;
+ }
+ catch(KeeperException e)
+ {
+ try
+ {
+ Thread.sleep(2000);
+ }
+ catch(InterruptedException e2)
+ {
+ System.err.println("Interrupted");
+ Thread.currentThread().interrupt();
+ break;
+ }
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ if(lease != null) {
+ semaphore.returnLease(lease);
+ }
+ }
+ }
+ }
+ });
+ }
+
+
+ final AtomicBoolean lost = new AtomicBoolean(false);
+ client.getConnectionStateListenable().addListener(new ConnectionStateListener() {
+
+ @Override
+ public void stateChanged(CuratorFramework client, ConnectionState newState) {
+ System.err.println("New state : " + newState);
+
+ if(newState == ConnectionState.LOST) {
+ lost.set(true);
+ }
+ }
+ });
+
+ Thread.sleep(2000);
+
+ System.err.println("Stopping server");
+ server.stop();
+ System.err.println("Stopped server");
+
+ while(!lost.get())
+ {
+ Thread.sleep(1000);
+ }
+
+ int preRestartCount = counter.get();
+
+ System.err.println("Restarting server");
+ server.restart();
+
+ long startCheckTime = System.currentTimeMillis();
+ while(true)
+ {
+ if(counter.get() > preRestartCount)
+ {
+ break;
+ }
+ else if((System.currentTimeMillis() - startCheckTime) > 30000)
+ {
+ Assert.fail("Semaphores not reacquired after restart");
+ }
+ }
+
+ }
+ finally
+ {
+ run.set(false);
+ executor.shutdownNow();
+ CloseableUtils.closeQuietly(client);
+ }
+ }
+}
[2/3] 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/e7fa01c5
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/e7fa01c5
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/e7fa01c5
Branch: refs/heads/interprocess_mutex_issue
Commit: e7fa01c593c15e29b284206689daefff7b68f3c7
Parents: b7c68f6
Author: Cam McKenzie <ca...@apache.org>
Authored: Wed Jun 1 11:50:54 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Wed Jun 1 11:50:54 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/e7fa01c5/curator-client/pom.xml
----------------------------------------------------------------------
diff --git a/curator-client/pom.xml b/curator-client/pom.xml
index 357d2d2..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-client</artifactId>
- <version>3.1.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/e7fa01c5/curator-examples/pom.xml
----------------------------------------------------------------------
diff --git a/curator-examples/pom.xml b/curator-examples/pom.xml
index d5fb9ea..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-examples</artifactId>
http://git-wip-us.apache.org/repos/asf/curator/blob/e7fa01c5/curator-framework/pom.xml
----------------------------------------------------------------------
diff --git a/curator-framework/pom.xml b/curator-framework/pom.xml
index a560365..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-framework</artifactId>
- <version>3.1.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/e7fa01c5/curator-recipes/pom.xml
----------------------------------------------------------------------
diff --git a/curator-recipes/pom.xml b/curator-recipes/pom.xml
index 44e9f6b..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-recipes</artifactId>
- <version>3.1.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/e7fa01c5/curator-test/pom.xml
----------------------------------------------------------------------
diff --git a/curator-test/pom.xml b/curator-test/pom.xml
index 301ccef..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-test</artifactId>
- <version>3.1.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/e7fa01c5/curator-x-discovery-server/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/pom.xml b/curator-x-discovery-server/pom.xml
index a88b68c..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-x-discovery-server</artifactId>
- <version>3.1.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/e7fa01c5/curator-x-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-discovery/pom.xml b/curator-x-discovery/pom.xml
index 62e7ebe..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<artifactId>curator-x-discovery</artifactId>
- <version>3.1.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/e7fa01c5/curator-x-rpc/pom.xml
----------------------------------------------------------------------
diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml
index 68c7959..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.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>curator-x-rpc</artifactId>
- <version>3.1.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/e7fa01c5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2e0fc99..1bf80bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
<groupId>org.apache.curator</groupId>
<artifactId>apache-curator</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <version>3.2.0</version>
<packaging>pom</packaging>
<name>Apache Curator</name>