[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14519233#comment-14519233
 ] 

Rakesh R commented on ZOOKEEPER-2062:
-------------------------------------

Thanks [~cnauroth] for taking care this. Latest patch looks nice!

For the {{testRemoveSingleWatcher}} and {{testMultipleDataWatchers}}. Its 
written to see any events triggered after the session closure. I think there is 
a space to improve this also. In these tests, {{assertFalse}} is too costly and 
we could replace the {{assertFalse}} statement like below and move them above 
{{zk1.close();}} statement.

{code}
        Assert.assertTrue("Didn't remove data watcher", w1.matches());
        Assert.assertFalse("Should have removed data watcher", w2.matches());
{code}

to 

{code}
        Assert.assertEquals("Didn't find data watcher", 1, 
zk2.getDataWatches().size());
        Assert.assertEquals("Didn't find data watcher", "/node2", 
zk2.getDataWatches().get(0));
        removeWatches(zk2, "/node2", w2, WatcherType.Any, false, Code.OK);
        Assert.assertTrue("Didn't remove data watcher", w2.matches());
{code}

> RemoveWatchesTest takes forever to run
> --------------------------------------
>
>                 Key: ZOOKEEPER-2062
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 3.5.0
>            Reporter: Flavio Junqueira
>            Assignee: Chris Nauroth
>         Attachments: ZOOKEEPER-2062.001.patch, ZOOKEEPER-2062.002.patch, 
> ZOOKEEPER-2062.003.patch
>
>
> [junit] Running org.apache.zookeeper.RemoveWatchesTest
>     [junit] Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
> 306.188 sec



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to