Repository: curator Updated Branches: refs/heads/CURATOR-397.2 11be719b3 -> 1b6216e97
Oops - modeled ZPath snuck into the main async package Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/1b6216e9 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/1b6216e9 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/1b6216e9 Branch: refs/heads/CURATOR-397.2 Commit: 1b6216e97be2771e927b7302160957834039579c Parents: 11be719 Author: randgalt <[email protected]> Authored: Fri Jul 14 12:04:25 2017 -0500 Committer: randgalt <[email protected]> Committed: Fri Jul 14 12:04:25 2017 -0500 ---------------------------------------------------------------------- .../main/java/org/apache/curator/x/async/AsyncWrappers.java | 6 ++++-- .../java/org/apache/curator/x/async/TestBasicOperations.java | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/1b6216e9/curator-x-async/src/main/java/org/apache/curator/x/async/AsyncWrappers.java ---------------------------------------------------------------------- diff --git a/curator-x-async/src/main/java/org/apache/curator/x/async/AsyncWrappers.java b/curator-x-async/src/main/java/org/apache/curator/x/async/AsyncWrappers.java index 7da82fc..9630985 100644 --- a/curator-x-async/src/main/java/org/apache/curator/x/async/AsyncWrappers.java +++ b/curator-x-async/src/main/java/org/apache/curator/x/async/AsyncWrappers.java @@ -20,6 +20,7 @@ package org.apache.curator.x.async; import org.apache.curator.framework.recipes.locks.InterProcessLock; import org.apache.curator.utils.ThreadUtils; +import org.apache.curator.utils.ZKPaths; import org.apache.curator.x.async.api.ExistsOption; import org.apache.curator.x.async.modeled.ZPath; import java.util.Collections; @@ -76,13 +77,14 @@ public class AsyncWrappers * @param path path to ensure * @return stage */ - public static CompletionStage<Void> asyncEnsureContainers(AsyncCuratorFramework client, ZPath path) + public static CompletionStage<Void> asyncEnsureContainers(AsyncCuratorFramework client, String path) { + String localPath = ZKPaths.makePath(path, "foo"); Set<ExistsOption> options = Collections.singleton(ExistsOption.createParentsAsContainers); return client .checkExists() .withOptions(options) - .forPath(path.child("foo").fullPath()) + .forPath(localPath) .thenApply(__ -> null) ; } http://git-wip-us.apache.org/repos/asf/curator/blob/1b6216e9/curator-x-async/src/test/java/org/apache/curator/x/async/TestBasicOperations.java ---------------------------------------------------------------------- diff --git a/curator-x-async/src/test/java/org/apache/curator/x/async/TestBasicOperations.java b/curator-x-async/src/test/java/org/apache/curator/x/async/TestBasicOperations.java index 78f37c2..3e980ec 100644 --- a/curator-x-async/src/test/java/org/apache/curator/x/async/TestBasicOperations.java +++ b/curator-x-async/src/test/java/org/apache/curator/x/async/TestBasicOperations.java @@ -23,7 +23,6 @@ import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.framework.api.transaction.CuratorOp; import org.apache.curator.retry.RetryOneTime; import org.apache.curator.utils.CloseableUtils; -import org.apache.curator.x.async.modeled.ZPath; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.data.Stat; @@ -69,7 +68,7 @@ public class TestBasicOperations extends CompletableBaseClassForTests @Test public void testCreateTransactionWithMode() throws Exception { - complete(AsyncWrappers.asyncEnsureContainers(client, ZPath.parse("/test"))); + complete(AsyncWrappers.asyncEnsureContainers(client, "/test")); CuratorOp op1 = client.transactionOp().create().withMode(PERSISTENT_SEQUENTIAL).forPath("/test/node-"); CuratorOp op2 = client.transactionOp().create().withMode(PERSISTENT_SEQUENTIAL).forPath("/test/node-");
