m1a2st commented on code in PR #23428:
URL: https://github.com/apache/kafka/pull/23428#discussion_r3995575465
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/SinkNodeTest.java:
##########
@@ -67,12 +65,9 @@ public void
shouldThrowStreamsExceptionOnInputRecordWithInvalidTimestamp() {
sink.init(context);
// When/Then
context.setTime(-1); // ensures a negative timestamp is set for the
record we send next
- try {
- illTypedSink.process(new Record<>("any key".getBytes(), "any
value".getBytes(), -1));
- fail("Should have thrown StreamsException");
- } catch (final StreamsException ignored) {
- // expected
- }
+ assertThrows(StreamsException.class,
+ () -> illTypedSink.process(new Record<>("any key".getBytes(), "any
value".getBytes(), -1)),
+ "Should have thrown StreamsException");
Review Comment:
I think this message is redundant. We can remove it.
--
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]