majialoong commented on code in PR #23428:
URL: https://github.com/apache/kafka/pull/23428#discussion_r3999569637


##########
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:
   Removed. Thanks for the review!



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

Reply via email to