You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Eugene Koontz (JIRA)" <ji...@apache.org> on 2011/07/20 20:26:58 UTC
[jira] [Commented] (ZOOKEEPER-1104) CLONE - In QuorumTest, use the
same "for ( .. try { break } catch { } )" pattern in
testFollowersStartAfterLeaders as in testSessionMove.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068534#comment-13068534 ]
Eugene Koontz commented on ZOOKEEPER-1104:
------------------------------------------
Hi, an earlier version of the patch for this issue is now in trunk since:
I am adding another, smaller patch that syncs trunk with the modifications of this patch (removing the unneeded "boolean success" variable).
> CLONE - In QuorumTest, use the same "for ( .. try { break } catch { } )" pattern in testFollowersStartAfterLeaders as in testSessionMove.
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1104
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1104
> Project: ZooKeeper
> Issue Type: Improvement
> Components: tests
> Affects Versions: 3.3.3, 3.4.0
> Reporter: sreekanth
> Assignee: Eugene Koontz
> Priority: Minor
> Fix For: 3.3.4, 3.4.0
>
> Attachments: ZOOKEEPER-1103.patch, ZOOKEEPER-1103_branch_3_3.patch
>
>
> Patrick Hunt writes:
> "Such uses of sleep [used in testFollowersStartAfterLeader] are just asking for trouble. Take a look at the use
> of sleep in testSessionMove in the same class for a better way to do
> this. I had gone through all the tests a while back, replacing all the
> "sleep(x)" with something like this testSessionMove pattern (retry
> with a max limit that's very long). During reviews we should look for
> anti-patterns like this and address them before commit."
> So, modify testFollowersStartAfterLeaders to use the same retrying approach that testSessionMove uses.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira