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

   ## What changes were proposed in this pull request?
   Improve assertTrue assertions in hadoop-hdds/framework
   Assertions in the form:
   ```
   assertTrue(<string>.contains(...))
   ```
   do not provide any information about the actual value, if the assertion 
fails.
   ```
   AssertionFailedError: expected: <true> but was: <false>
   ```
   This can be improved by replacing them with:
   ```
   import static org.assertj.core.api.Assertions.assertThat;
   assertThat(<string>).contains(...)
   ```
   which gives us more info in the form:
   ```
   AssertionError: 
   
   Expecting:
    <"actual string">
   to contain:
    <"part"> 
   ```
   Similarly, assertions about inequality relations, e.g.:
   ```
   assertTrue(<x> > <y>)
   ```
   can be replaced with:
   ```
   assertThat(<x>).isGreaterThan(<y>);
   ```
   The goal of this task is to find and replace such assertTrue assertions.
   
   
   ## What is the link to the Apache JIRA
   [HDDS-9982](https://issues.apache.org/jira/browse/HDDS-9982?filter=-1)
   
   ## How was this patch tested?
   
   ## CI
   
   


-- 
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