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

Jitendra Nath Pandey commented on RATIS-381:
--------------------------------------------

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)

Reply via email to