You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/17 23:37:41 UTC
[jira] [Commented] (ZOOKEEPER-2759) Flaky test:
org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971820#comment-15971820 ]
ASF GitHub Bot commented on ZOOKEEPER-2759:
-------------------------------------------
GitHub user afine opened 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 <af...@apache.org>
Date: 2017-04-17T22:51:27Z
ZOOKEEPER-2759: Flaky test:
org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid
----
> 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
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)