zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid
Date Fri, 28 Apr 2017 02:09:04 GMT

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

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

GitHub user afine reopened a pull request:

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

    ZOOKEEPER-2759: Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

    I noticed some inconsistent test results from `testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid`.
It can be seen failing on Apache infra here: http://mail-archives.apache.org/mod_mbox/zookeeper-dev/201701.mbox/%3c374175863.2852.1485127554310.JavaMail.jenkins@crius%3e
    
    The problem can be "reproduced" by adding a `Thread.sleep(4000)` as the first line of
the finally block   for `RecvWorker.run` in `QuorumCnxManager.java`.
    
    The issue is caused by a race condition between the removal of the relevant `sid` from
`senderWorkerMap` for `peer0` and the 3 second delay from `assertEventuallyNotConnected`.

    
    Other tests in this class do not experience the same problem because `testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid`
is unique in that it is the only test using `assertEventuallyNotConnected` where the peer
with the lower `sid` is not using SASL. This means that the peer with the lower `sid` will
always create send and receive workers in `handleConnection` (as it will not throw an exception
on `authServer.authenticate(sock, din)`) and may not destroy them in time for the test assertion.
    


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

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

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

    https://github.com/apache/zookeeper/pull/229.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 #229
    
----
commit c567c494d116b6893e24e5b1b812a6ff24791614
Author: Abraham Fine <afine@apache.org>
Date:   2017-04-17T22:51:27Z

    ZOOKEEPER-2759: Flaky test:
    org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

commit 112a70ba14f5cbb94e301702b328acfff54b0b02
Author: Abraham Fine <afine@apache.org>
Date:   2017-04-27T03:56:01Z

    fix tests with mockito

commit 55869fac9d0f99eb52156c889e1b5a76424047f6
Author: Abraham Fine <afine@apache.org>
Date:   2017-04-27T20:05:00Z

    add some comments

----


> Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2759
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2759
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.10
>            Reporter: Abraham Fine
>            Assignee: Abraham Fine
>             Fix For: 3.4.11
>
>




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

Mime
View raw message