Repository: curator
Updated Branches:
  refs/heads/master 219c881f1 -> 4251fe328


CURATOR-501 remove ZK 3.5 only class from expectedExceptions in test annotation


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

Branch: refs/heads/master
Commit: 4251fe328908e5fca37af034fabc190aa452c73f
Parents: 219c881
Author: randgalt <[email protected]>
Authored: Mon Jan 7 16:44:23 2019 -0500
Committer: randgalt <[email protected]>
Committed: Mon Jan 7 16:44:23 2019 -0500

----------------------------------------------------------------------
 .../curator/framework/imps/TestRemoveWatches.java       | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/4251fe32/curator-framework/src/test/java/org/apache/curator/framework/imps/TestRemoveWatches.java
----------------------------------------------------------------------
diff --git 
a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestRemoveWatches.java
 
b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestRemoveWatches.java
index f3b4f8d..63d8931 100644
--- 
a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestRemoveWatches.java
+++ 
b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestRemoveWatches.java
@@ -449,7 +449,7 @@ public class TestRemoveWatches extends CuratorTestBase
      * be thrown. 
      * @throws Exception
      */
-    @Test(expectedExceptions=KeeperException.NoWatcherException.class)
+    @Test
     public void testRemoveUnregisteredWatcher() throws Exception
     {
         CuratorFramework client = CuratorFrameworkFactory.builder().
@@ -468,7 +468,15 @@ public class TestRemoveWatches extends CuratorTestBase
                 }                
             };
             
-            client.watches().remove(watcher).forPath(path);
+            try
+            {
+                client.watches().remove(watcher).forPath(path);
+                Assert.fail("Expected KeeperException.NoWatcherException");
+            }
+            catch ( KeeperException.NoWatcherException expected )
+            {
+                // expected
+            }
         }
         finally
         {

Reply via email to