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

ASF GitHub Bot commented on ZOOKEEPER-2798:
-------------------------------------------

GitHub user afine opened a pull request:

    https://github.com/apache/zookeeper/pull/270

    ZOOKEEPER-2798 Fix flaky test: 
org.apache.zookeeper.test.ReadOnlyModeTest.testConnectionEvents

    When a client connection occurs, the `ClientCnxn`'s `state` is changed and 
then a watcher event is queued. This test is unreliable because it expects the 
watcher to fire immediately after the state changes. This test adds a 
`CountDownLatch` to the watcher, to  better track when it has been fired. 
    
    This flaky test can be reliably reproduced by adding a `Thread.sleep` right 
before `states.add(event.getState());`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/afine/zookeeper ZOOKEEPER-2798

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/270.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #270
    
----
commit 2a4dcd2e7726a041d54f5c114eec0b035bf74989
Author: Abraham Fine <[email protected]>
Date:   2017-06-01T20:52:07Z

    ZOOKEEPER-2798: Fix flaky test: 
org.apache.zookeeper.test.ReadOnlyModeTest.testConnectionEvents

----


> Fix flaky test: 
> org.apache.zookeeper.test.ReadOnlyModeTest.testConnectionEvents
> -------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2798
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2798
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.10, 3.5.3
>            Reporter: Abraham Fine
>            Assignee: Abraham Fine
>
> This test appears to be failing intermitently on both 3.4 and 3.5. Here are a 
> couple of example failing jobs.
> 3.4: https://builds.apache.org/job/ZooKeeper_branch34_jdk7/1404/
> 3.5: https://builds.apache.org/job/ZooKeeper_branch35_jdk8/459/



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to