Repository: curator
Updated Branches:
  refs/heads/master dad2888c7 -> b3fb2cfee


CURATOR-179 - Added test case to reproduce the issue.

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

Branch: refs/heads/master
Commit: 3a327efaf565f2613fc7b783dd08ca8f39836695
Parents: a0a676e
Author: Cameron McKenzie <came...@unico.com.au>
Authored: Thu Jan 8 14:26:14 2015 +1100
Committer: Cameron McKenzie <came...@unico.com.au>
Committed: Thu Jan 8 14:26:14 2015 +1100

----------------------------------------------------------------------
 .../curator/framework/imps/TestFramework.java     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/3a327efa/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 5a640db..0806913 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
@@ -767,4 +767,22 @@ public class TestFramework extends BaseClassForTests
             client.close();
         }
     }
+    
+    @Test
+    public void     testSequentialWithTrailingSeparator() throws Exception
+    {
+        CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1));
+        client.start();
+        try
+        {
+            client.create().forPath("/test");
+            //This should create a node in the form of "/test/00000001"
+            String    path = 
client.create().withMode(CreateMode.PERSISTENT_SEQUENTIAL).forPath("/test/");
+            Assert.assertTrue(path.startsWith("/test/"));
+        }
+        finally
+        {
+            client.close();
+        }
+    }    
 }

Reply via email to