You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Adam Antal (Jira)" <ji...@apache.org> on 2020/04/30 11:55:00 UTC

[jira] [Comment Edited] (YUNIKORN-53) Use asserts for nil error checks in test code

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

Adam Antal edited comment on YUNIKORN-53 at 4/30/20, 11:54 AM:
---------------------------------------------------------------

Yes, sure. My patch has been in progress, I will upload when I finish with it.


was (Author: adam.antal):
Yes, sure. My patch is has been in progress, I will upload when I finish with it.

> Use asserts for nil error checks in test code
> ---------------------------------------------
>
>                 Key: YUNIKORN-53
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-53
>             Project: Apache YuniKorn
>          Issue Type: Bug
>          Components: test - smoke, test - unit
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Adam Antal
>            Priority: Minor
>              Labels: newbie, pull-request-available
>
> In a lot of tests we use the construct:
> {code}
> if err != nil {
>  t.Fatal("some text"
> }{code}
> We should replace that with the simple:
> {code}
> assert.NilError(t, err, "some text"){code}
> that is part of the standard assert package we already use in the test code



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org