[
https://issues.apache.org/jira/browse/HDDS-10278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-10278:
----------------------------------
Labels: pull-request-available (was: )
> 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
>
> {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]