curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dragonsi...@apache.org
Subject curator git commit: Test TreeCache works on deep non-existent path.
Date Wed, 07 Jan 2015 23:19:19 GMT
Repository: curator
Updated Branches:
  refs/heads/master f17b46fe7 -> a0a676e3e


Test TreeCache works on deep non-existent path.


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

Branch: refs/heads/master
Commit: a0a676e3e1c98c991d3c4acb156ff8ad3cff1436
Parents: f17b46f
Author: Scott Blum <dragonsinth@apache.org>
Authored: Wed Jan 7 18:18:41 2015 -0500
Committer: Scott Blum <dragonsinth@apache.org>
Committed: Wed Jan 7 18:18:41 2015 -0500

----------------------------------------------------------------------
 .../framework/recipes/cache/TestTreeCache.java        | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/a0a676e3/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCache.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCache.java
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCache.java
index bfd051a..777f416 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCache.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCache.java
@@ -68,6 +68,20 @@ public class TestTreeCache extends BaseTestTreeCache
     }
 
     @Test
+    public void testStartEmptyDeeper() throws Exception
+    {
+        cache = newTreeCacheWithListeners(client, "/test/foo/bar");
+        cache.start();
+        assertEvent(TreeCacheEvent.Type.INITIALIZED);
+
+        client.create().creatingParentsIfNeeded().forPath("/test/foo");
+        assertNoMoreEvents();
+        client.create().forPath("/test/foo/bar");
+        assertEvent(TreeCacheEvent.Type.NODE_ADDED, "/test/foo/bar");
+        assertNoMoreEvents();
+    }
+
+    @Test
     public void testDepth0() throws Exception
     {
         client.create().forPath("/test");


Mime
View raw message