Repository: curator Updated Branches: refs/heads/CURATOR-341 [created] 9612c5fbf
CURATOR-341: Don't retry create operation after setData Resulted in infinite amount of retries Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/9612c5fb Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/9612c5fb Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/9612c5fb Branch: refs/heads/CURATOR-341 Commit: 9612c5fbf6d1bcac591f0d627c05abc85cd975c4 Parents: 7e8a76e Author: Henrik Nordvik <[email protected]> Authored: Thu Aug 11 12:17:02 2016 +0200 Committer: Henrik Nordvik <[email protected]> Committed: Thu Aug 11 12:59:05 2016 +0200 ---------------------------------------------------------------------- .../org/apache/curator/framework/imps/CreateBuilderImpl.java | 1 - .../java/org/apache/curator/framework/imps/TestFramework.java | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/9612c5fb/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java index 8096802..34009b1 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java @@ -749,7 +749,6 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt { // ignore } - client.queueOperation(mainOperationAndData); } }; client.queueOperation(new OperationAndData<>(operation, null, null, null, null, null)); http://git-wip-us.apache.org/repos/asf/curator/blob/9612c5fb/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 7234088..44f9486 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 @@ -191,6 +191,10 @@ public class TestFramework extends BaseClassForTests Assert.assertEquals(event.getType(), CuratorEventType.CREATE); Assert.assertEquals(event.getPath(), "/a/b/c"); Assert.assertEquals(event.getName(), "/a/b/c"); + + // callback should only be called once + CuratorEvent unexpectedEvent = queue.poll(new Timing().milliseconds(), TimeUnit.MILLISECONDS); + Assert.assertNull(unexpectedEvent); } finally {
