Flavio Paiva Junqueira updated ZOOKEEPER-693:

    Attachment: ZOOKEEPER-693.patch

Taking a look at the log, I realized that that the execution of the two tests 
of ObserverTest were overlapping. More specifically, leader election instances 
were not being shut down correctly after the first test (testObserver), and it 
seems that they were interfering with the second test (testSingleObserver).  

The real issue is that I have been shutting down FLE separately from the 
QuorumPeer in tests, and QuorumPeerTestBase that ObserverTest is using has no 
way to access the underlying QuorumPeer instance. 

To solve this problem, I simply added code to QuorumPeer:shutdown so that we 
make sure that we shutdown all leader election instances. I had to also add a 
new method to the Election interface, and implement an empty method in 

Since it is ok to call shutdown multiple times, I'll leave the FLE tests 
untouched for this patch. I have run the tests a few times, and I didn't see 
any issue. I'll create a jira issue to remove the duplicate calls to shutdown. 

> TestObserver stuck in tight notification loop in FLE
> ----------------------------------------------------
>                 Key: ZOOKEEPER-693
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-693
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.3.0
>            Reporter: Henry Robinson
>            Priority: Critical
>             Fix For: 3.3.0
>         Attachments: ZOOKEEPER-693.patch
> See 
> http://hudson.zones.apache.org/hudson/view/ZooKeeper/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/77/testReport/junit/org.apache.zookeeper.test/ObserverTest/testObserver/
>      [exec]     [junit] 2010-03-04 00:23:37,803 - INFO  
> [QuorumPeer:/0:0:0:0:0:0:0:0:11229:fastleaderelect...@683] - Notification 
> time out: 3200
>      [exec]     [junit] 2010-03-04 00:23:37,804 - INFO  
> [QuorumPeer:/0:0:0:0:0:0:0:0:11229:fastleaderelect...@689] - Notification: 2, 
> 0, 2, 3, LOOKING, LOOKING, 1
> ad infinitum. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to