You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2018/11/01 01:26:00 UTC

[jira] [Updated] (RATIS-381) RaftTestUtil.waitForLeader should not return null

     [ https://issues.apache.org/jira/browse/RATIS-381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo Nicholas Sze updated RATIS-381:
--------------------------------------
    Attachment: r381_20181101.patch

> 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_20181101.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)