nastra opened a new issue, #7040:
URL: https://github.com/apache/iceberg/issues/7040

   ### Feature Request / Improvement
   
   We should ensure that test code asserting on exceptions should always check 
for the underlying exception message as shown below:
   
   ```
   // should fail because it doesn't check for the underlying message
   Assertions.assertThatThrownBy(() -> ...)
           .isInstanceOf(ValidationException.class);
   
   // should not fail as it checks for the exception message
   Assertions.assertThatThrownBy(() -> ...)
           .isInstanceOf(ValidationException.class)
           .hasMessageContaining(...);
   
   // should fail because it doesn't check for the underlying message
   Assertions.assertThatExceptionOfType(NotFoundException.class)
           .isThrownBy(() -> ...);
   
   // should not fail as it checks for the exception message
   Assertions.assertThatExceptionOfType(NotFoundException.class)
           .isThrownBy(() -> ...)
           .withMessageContaining(...);
   ```
   
   ### Query engine
   
   None


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