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

Till Rohrmann commented on FLINK-2733:
--------------------------------------

I think my analysis was not correct. I checked and of course Curator will try 
to reconnect to ZooKeeper if the connection is lost. The problem was the 
following (hopefully I got it right this time ;-)

The test uses a leader retrieval service to find out which of the current 
leader contenders is the leader. Assume contender 0 is granted the leadership 
and the leader retrieval service is informed about it. Shortly afterwards, the 
contender 0 is revoked the leadership but the retrieval service is not yet 
informed about it. The test now compares the leader session id of the retrieval 
service with the contender whose address was returned. Since the leadership was 
revoked, the leader session id returned by the contender is null. That's the 
problem. I modified the test to allow false positive leaders being returned 
from the leader retrieval service.

> ZooKeeperLeaderElectionTest.testZooKeeperReelection fails
> ---------------------------------------------------------
>
>                 Key: FLINK-2733
>                 URL: https://issues.apache.org/jira/browse/FLINK-2733
>             Project: Flink
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Robert Metzger
>            Assignee: Till Rohrmann
>              Labels: test-stability
>
> I observed a test failure in this run: 
> https://travis-ci.org/rmetzger/flink/jobs/81571914
> {code}
> testZooKeeperReelection(org.apache.flink.runtime.leaderelection.ZooKeeperLeaderElectionTest)
>   Time elapsed: 109.794 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<d6e0ee70-5192-4d44-8989-09f8425feecc> but 
> was:<null>
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:743)
>       at org.junit.Assert.assertEquals(Assert.java:118)
>       at org.junit.Assert.assertEquals(Assert.java:144)
>       at 
> org.apache.flink.runtime.leaderelection.ZooKeeperLeaderElectionTest.testZooKeeperReelection(ZooKeeperLeaderElectionTest.java:171)
> Results :
> Failed tests: 
>   ZooKeeperLeaderElectionTest.testZooKeeperReelection:171 
> expected:<d6e0ee70-5192-4d44-8989-09f8425feecc> but was:<null>
> {code}



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

Reply via email to