Repository: curator
Updated Branches:
  refs/heads/CURATOR-3.0 5cf7d050f -> 304da977e


testChildReaperCleansUpLockNodes() didn't work when container nodes are used


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

Branch: refs/heads/CURATOR-3.0
Commit: 304da977e32b7f311cefc9cba3d28e2ec236e38b
Parents: 5cf7d05
Author: randgalt <randg...@apache.org>
Authored: Fri Jan 13 09:04:31 2017 -0500
Committer: randgalt <randg...@apache.org>
Committed: Fri Jan 13 09:04:31 2017 -0500

----------------------------------------------------------------------
 .../recipes/locks/TestInterProcessSemaphore.java         | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/304da977/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
----------------------------------------------------------------------
diff --git 
a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
 
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
index 488b776..73c76e8 100644
--- 
a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
+++ 
b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessSemaphore.java
@@ -691,9 +691,16 @@ public class TestInterProcessSemaphore extends 
BaseClassForTests
 
             timing.forWaiting().sleepABit();
 
-            List<String> children = client.getChildren().forPath("/test");
+            try
+            {
+                List<String> children = client.getChildren().forPath("/test");
 
-            Assert.assertEquals(children.size(), 0, "All children of /test 
should have been reaped");
+                Assert.assertEquals(children.size(), 0, "All children of /test 
should have been reaped");
+            }
+            catch ( KeeperException.NoNodeException ok )
+            {
+                // this is OK - if Container Nodes are used the "/test" path 
will go away - no point in updating the test for deprecated code
+            }
         }
         finally
         {

Reply via email to