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

Attila Doroszlai resolved HDDS-10278.
-------------------------------------
    Fix Version/s: 1.5.0
       Resolution: Done

> Simplify tests using assertDoesNotThrow
> ---------------------------------------
>
>                 Key: HDDS-10278
>                 URL: https://issues.apache.org/jira/browse/HDDS-10278
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Attila Doroszlai
>            Assignee: Zhaohui Wang
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.5.0
>
>
> {code}
> try {
>   <some action>
> } catch (...) {
>   fail()
> }
> {code}
> {{try-catch-fail}} can be changed to:
> {code}
> <setup>
> assertDoesNotThrow(() -> <action which may throw>)
> {code}
> if the test does not have any assertions other than the {{fail()}} call being 
> removed.  (See HDDS-10277 for even more simpler solution if the test has 
> other assertions.)
> Please minimize the part moved inside the lambda expression.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to