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/10/23 00:59:43 UTC

[6/6] curator git commit: Merge branch 'master' into CURATOR-3.0

Merge branch 'master' into CURATOR-3.0

Conflicts:
	curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java


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

Branch: refs/heads/CURATOR-3.0
Commit: 598141892e571b075da01dbb972bf45aaf89e3ed
Parents: ac5c132 3862ada
Author: randgalt <ra...@apache.org>
Authored: Thu Oct 22 17:59:30 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Thu Oct 22 17:59:30 2015 -0500

----------------------------------------------------------------------
 .../curator/framework/EnsureContainers.java     | 64 +++++++++++++++++
 .../framework/imps/TestEnsureContainers.java    | 73 ++++++++++++++++++++
 .../recipes/cache/PathChildrenCache.java        | 13 ++--
 .../recipes/queue/SimpleDistributedQueue.java   | 13 ++--
 .../recipes/cache/TestPathChildrenCache.java    | 23 +++---
 5 files changed, 166 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/59814189/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
----------------------------------------------------------------------
diff --cc curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
index e4e18d9,3ee6b6d..e42db22
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
@@@ -27,7 -27,7 +27,8 @@@ import com.google.common.collect.Immuta
  import com.google.common.collect.Maps;
  import com.google.common.collect.Sets;
  import org.apache.curator.framework.CuratorFramework;
 +import org.apache.curator.framework.WatcherRemoveCuratorFramework;
+ import org.apache.curator.framework.EnsureContainers;
  import org.apache.curator.framework.api.BackgroundCallback;
  import org.apache.curator.framework.api.CuratorEvent;
  import org.apache.curator.framework.listen.ListenerContainer;

http://git-wip-us.apache.org/repos/asf/curator/blob/59814189/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
----------------------------------------------------------------------
diff --cc curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
index a4e2b2e,14d061f..8792044
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestPathChildrenCache.java
@@@ -277,18 -300,18 +277,21 @@@ public class TestPathChildrenCache exte
          client.start();
          try
          {
--            PathChildrenCache cache = new PathChildrenCache(client, "/one/two/three", false);
--            cache.start();
--            timing.sleepABit();
--
--            try
++            try ( PathChildrenCache cache = new PathChildrenCache(client, "/one/two/three", false) )
              {
--                client.create().forPath("/one/two/three/four");
--            }
--            catch ( KeeperException.NoNodeException e )
--            {
--                Assert.fail("Path should exist", e);
++                cache.start();
++                timing.sleepABit();
++
++                try
++                {
++                    client.create().forPath("/one/two/three/four");
++                }
++                catch ( KeeperException.NoNodeException e )
++                {
++                    Assert.fail("Path should exist", e);
++                }
              }
++            timing.sleepABit();
          }
          finally
          {