chia7712 commented on code in PR #23307:
URL: https://github.com/apache/kafka/pull/23307#discussion_r3906901153
##########
streams/src/test/java/org/apache/kafka/streams/internals/ApiUtilsTest.java:
##########
@@ -39,49 +38,45 @@ public class ApiUtilsTest {
public void shouldThrowNullPointerExceptionForNullDuration() {
final String nullDurationPrefix =
prepareMillisCheckFailMsgPrefix(null, "nullDuration");
- try {
- validateMillisecondDuration(null, nullDurationPrefix);
- fail("Expected exception when null passed to duration.");
- } catch (final IllegalArgumentException e) {
- assertThat(e.getMessage(), containsString(nullDurationPrefix));
- }
+ final IllegalArgumentException e = assertThrows(
+ IllegalArgumentException.class,
Review Comment:
It seems the test name is not aligned with this exception. Could you fix
that in this PR as well?
--
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]