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 2017/07/20 17:20:13 UTC
[1/2] curator git commit: need to sleep a bit between setcounts so to
avoid missing events
Repository: curator
Updated Branches:
refs/heads/CURATOR-425 20a3db363 -> 6b6f13f74
need to sleep a bit between setcounts so to avoid missing events
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/96340af1
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/96340af1
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/96340af1
Branch: refs/heads/CURATOR-425
Commit: 96340af1d1525b2c5bf50adccc499c6917ff7563
Parents: 20a3db3
Author: randgalt <ra...@apache.org>
Authored: Thu Jul 20 12:17:35 2017 -0500
Committer: randgalt <ra...@apache.org>
Committed: Thu Jul 20 12:17:35 2017 -0500
----------------------------------------------------------------------
.../curator/framework/recipes/shared/TestSharedCount.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/96340af1/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
index 6a0b7c2..822a01c 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
@@ -33,6 +33,7 @@ import org.apache.curator.retry.RetryNTimes;
import org.apache.curator.retry.RetryOneTime;
import org.apache.curator.test.BaseClassForTests;
import org.apache.curator.test.Timing;
+import org.apache.curator.test.compatibility.CuratorTestBase;
import org.apache.curator.utils.CloseableUtils;
import org.apache.zookeeper.WatchedEvent;
import org.testng.Assert;
@@ -50,7 +51,7 @@ import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-public class TestSharedCount extends BaseClassForTests
+public class TestSharedCount extends CuratorTestBase
{
@Test
public void testMultiClients() throws Exception
@@ -191,8 +192,11 @@ public class TestSharedCount extends BaseClassForTests
count.addListener(listener);
Assert.assertTrue(count.trySetCount(1));
+ timing.sleepABit();
Assert.assertTrue(count.trySetCount(2));
+ timing.sleepABit();
Assert.assertTrue(count.trySetCount(10));
+ timing.sleepABit();
Assert.assertEquals(count.getCount(), 10);
Assert.assertTrue(new Timing().awaitLatch(setLatch));
[2/2] curator git commit: license
Posted by ra...@apache.org.
license
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/6b6f13f7
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/6b6f13f7
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/6b6f13f7
Branch: refs/heads/CURATOR-425
Commit: 6b6f13f74afa0fe3d8752224c1af82c2709e7f6b
Parents: 96340af
Author: randgalt <ra...@apache.org>
Authored: Thu Jul 20 12:17:50 2017 -0500
Committer: randgalt <ra...@apache.org>
Committed: Thu Jul 20 12:17:50 2017 -0500
----------------------------------------------------------------------
.../java/org/apache/curator/test/DummyTest.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/6b6f13f7/curator-test-zk34/src/test/java/org/apache/curator/test/DummyTest.java
----------------------------------------------------------------------
diff --git a/curator-test-zk34/src/test/java/org/apache/curator/test/DummyTest.java b/curator-test-zk34/src/test/java/org/apache/curator/test/DummyTest.java
index 2f6afa8..f19a85b 100644
--- a/curator-test-zk34/src/test/java/org/apache/curator/test/DummyTest.java
+++ b/curator-test-zk34/src/test/java/org/apache/curator/test/DummyTest.java
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.curator.test;
import org.testng.annotations.Test;