only countdown on success

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

Branch: refs/heads/master
Commit: ab2e756323b5c5398b01cb1493fbc984f572b946
Parents: 166b5c3
Author: randgalt <[email protected]>
Authored: Tue Dec 5 13:00:02 2017 -0800
Committer: randgalt <[email protected]>
Committed: Tue Dec 5 13:00:02 2017 -0800

----------------------------------------------------------------------
 .../org/apache/curator/framework/imps/TestFrameworkEdges.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/ab2e7563/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
----------------------------------------------------------------------
diff --git 
a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
 
b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
index 75d97b1..86133b8 100644
--- 
a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
+++ 
b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkEdges.java
@@ -77,7 +77,10 @@ public class TestFrameworkEdges extends BaseClassForTests
                 @Override
                 public void processResult(CuratorFramework client, 
CuratorEvent event) throws Exception
                 {
-                    latch.countDown();
+                    if ( (event.getType() == CuratorEventType.CREATE) && 
(event.getResultCode() == KeeperException.Code.OK.intValue()) )
+                    {
+                        latch.countDown();
+                    }
                 }
             };
             // queue multiple operations for a more complete test

Reply via email to