[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-28 Thread ASF GitHub Bot (JIRA)

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

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

Github user afine closed the pull request at:

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


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-28 Thread ASF GitHub Bot (JIRA)

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

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

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/242
  
merged, please close this pr @afine.


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user afine commented on the issue:

https://github.com/apache/zookeeper/pull/229
  
@hanm please see https://github.com/apache/zookeeper/pull/242


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user afine closed the pull request at:

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


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/229
  
@afine Can you please rebase your working branch with apache branch-3.4 and 
then open a new PR (just one line fix) for your recent fix? The new PR can 
reuse same JIRA issue.


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2759:
--

-1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 3 new or modified tests.

-1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 90 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/654//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/654//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/654//console

This message is automatically generated.

> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 
Date:   2017-04-17T22:51:27Z

ZOOKEEPER-2759: Flaky test:

org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

commit 112a70ba14f5cbb94e301702b328acfff54b0b02
Author: Abraham Fine 
Date:   2017-04-27T03:56:01Z

fix tests with mockito

commit 55869fac9d0f99eb52156c889e1b5a76424047f6
Author: Abraham Fine 
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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user afine closed the pull request at:

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


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user afine commented on the issue:

https://github.com/apache/zookeeper/pull/229
  
thanks @hanm for the review


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2759:
--

-1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 3 new or modified tests.

-1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 90 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/652//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/652//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/652//console

This message is automatically generated.

> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

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

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/229
  
lgtm. One minor comment - a short comment in the test case would help for 
future readers here since this test case is the only case use a different 
connection status verification. 


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-27 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2759:
--

-1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 3 new or modified tests.

-1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 90 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

-1 contrib tests.  The patch failed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/648//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/648//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/648//console

This message is automatically generated.

> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-26 Thread ASF GitHub Bot (JIRA)

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

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

Github user afine commented on the issue:

https://github.com/apache/zookeeper/pull/229
  
@hanm thank you for the through review. you are right the original test is 
bogus.

I wanted to write the test in a way that verifies behavior for both peers 
so I used mockito to spy on the sender worker maps. Let me know what you think.


> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-25 Thread ASF GitHub Bot (JIRA)

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

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

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/229
  
Thanks for work on this! I hope we have more contributors focus on 
improving the test.

The proposed fix masks the real problem - it will always success no matter 
what - even if the connection was succeeded, since the halt will clean up the 
sender worker map of the peer 0.

>>  a race condition between the removal of the relevant sid from 
senderWorkerMap for peer0 and the 3 second delay from 
assertEventuallyNotConnected.
I think there is a race, but my observation on it is slightly different. 
The race is between when peer 0 received (and finished) establish connection 
with peer 1, and the assert inside assertEventuallyNotConnected.

>> may not destroy them in time for the test assertion.
Because of the race, once peer 0 has received the connection, its sender 
worker map will has sid 1 entry forever until the death of the peer 0 itself. 

I think instead of checking on peer 0, we can check peer 1. Its sender 
worker map should always be clean. We can't check peer 0 here because the 
current API does not encode the true state of the connection - it only encodes 
what happened (the connection from 1 to 0 was established on 0's side), but it 
does not encode the status of the connection (is the connection still alive or 
not - in this case peer 1 will close the socket later when it found out peer 0 
has no auth. but on peer 0 side the sender work will have sid 1 inside until 
its death, what's done has been done.). The state of peer 1 wrt its sender map 
should also reflect state of peer 0  since there is only a single connection 
between 0 and 1.

Something like this should serve the purpose:
assertEventuallyNotConnected(peer1, 0);

Maybe add a sleep before it to make sure all the connection attempts were 
made (from 0  to 1 and from 1 to 0 two ways), but it's a best effort. 5 sec 
sounds enough.




> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-17 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2759:
--

-1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 3 new or modified tests.

-1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 90 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/550//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/550//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/550//console

This message is automatically generated.

> 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)


[jira] [Commented] (ZOOKEEPER-2759) Flaky test: org.apache.zookeeper.server.quorum.QuorumCnxManagerTest.testNoAuthLearnerConnectToAuthRequiredServerWithHigherSid

2017-04-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 
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)