curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cammcken...@apache.org
Subject curator git commit: CURATOR-179 - Added test case to reproduce the issue.
Date Thu, 08 Jan 2015 03:26:47 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-179 [created] 3a327efaf


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/CURATOR-179
Commit: 3a327efaf565f2613fc7b783dd08ca8f39836695
Parents: a0a676e
Author: Cameron McKenzie <cameron@unico.com.au>
Authored: Thu Jan 8 14:26:14 2015 +1100
Committer: Cameron McKenzie <cameron@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();
+        }
+    }    
 }


Mime
View raw message