You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Jitendra Nath Pandey (JIRA)" <ji...@apache.org> on 2018/11/03 08:47:00 UTC
[jira] [Comment Edited] (RATIS-381) RaftTestUtil.waitForLeader
should not return null
[ https://issues.apache.org/jira/browse/RATIS-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673967#comment-16673967 ]
Jitendra Nath Pandey edited comment on RATIS-381 at 11/3/18 8:46 AM:
---------------------------------------------------------------------
A few minor comments.
# Import of RaftTestUtil is no longer needed in {{ServerInformationBaseTest}}
# {{waitForLeader}} can still return null if the {{expectLeader}} parameter is false, however that looks ok to me.
I am +1 for the patch. The import can be fixed while committing.
was (Author: jnp):
A few minor comments.
# Import of RaftTestUtil is no longer needed in {{ServerInformationBaseTest}}
# {{waitForLeader}} can still return null if the {{expectLeader}} parameter is false, however that looks ok to me.
> RaftTestUtil.waitForLeader should not return null
> -------------------------------------------------
>
> Key: RATIS-381
> URL: https://issues.apache.org/jira/browse/RATIS-381
> Project: Ratis
> Issue Type: Improvement
> Components: test
> Reporter: Tsz Wo Nicholas Sze
> Assignee: Tsz Wo Nicholas Sze
> Priority: Minor
> Attachments: r381_20181101b.patch
>
>
> Some tests may fail with NullPointerException since RaftTestUtil.waitForLeader(..) may return null (and the tests do not check for null) when leader elections take a long time.
> It seems RaftTestUtil.waitForLeader(..) better waits for a longer period and, if there is a no leader, throw an exception with some descriptive error message, instead of returning null.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)