wzhallright opened a new pull request, #6291:
URL: https://github.com/apache/ozone/pull/6291

   ## What changes were proposed in this pull request?
   Simplify tests using assertDoesNotThrow
   
   Please describe your PR in detail:
   ```
   try {   
     <some action>   
   } catch (...) {   
     fail()   
   }
   ```
   try-catch-fail can be changed to:
   ```
   <setup>
   assertDoesNotThrow(() -> <action which may throw>)
   ```
   if the test does not have any assertions other than the fail() call being 
removed. (See [HDDS-10277](https://issues.apache.org/jira/browse/HDDS-10277) 
for even more simpler solution if the test has other assertions.)
   
   
   ## What is the link to the Apache JIRA
   [HDDS-10278](https://issues.apache.org/jira/browse/HDDS-10278)
   
   ## CI
   https://github.com/wzhallright/ozone/actions/runs/8076086411
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to