nastra commented on code in PR #5221:
URL: https://github.com/apache/iceberg/pull/5221#discussion_r918614879
##########
.baseline/checkstyle/checkstyle.xml:
##########
@@ -410,6 +410,11 @@
<property name="format" value="(void setUp\(\))|(void
setup\(\))|(void setupStatic\(\))|(void setUpStatic\(\))|(void
beforeTest\(\))|(void teardown\(\))|(void tearDown\(\))|(void
beforeStatic\(\))|(void afterStatic\(\))"/>
<property name="message" value="Test setup/teardown methods are
called before(), beforeClass(), after(), afterClass(), but not setUp, teardown,
etc."/>
</module>
+ <module name="RegexpSinglelineJava">
+ <property name="ignoreComments" value="true"/>
+ <property name="format" value="@Test\(.*expected.*\)"/>
+ <property name="message" value="Prefer using
Assertions.assertThatThrownBy(...).isInstanceOf(...) instead."/>
Review Comment:
looks like there are about 800 usages of different variations of
`assertThrows` in the codebase, so not sure we'd want to update all of those.
Maybe we'll just mention in the checkstyle message `Prefer using
AssertHelper.assertThrows(...) or
Assertions.assertThatThrownBy(...).isInstanceOf(...) instead`. I believe both
cases should be valid, where `Assertions.assertThatThrownBy(...)` just gives
you more flexibility over things
--
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]