XComp commented on code in PR #19808:
URL: https://github.com/apache/flink/pull/19808#discussion_r892518137


##########
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBaseTest.java:
##########
@@ -165,13 +164,13 @@ public void testAsyncErrorRethrownOnInvoke() throws 
Throwable {
             testHarness.processElement(new StreamRecord<>("msg-2"));
         } catch (Exception e) {
             // the next invoke should rethrow the async exception
-            Assert.assertTrue(e.getCause().getMessage().contains("artificial 
async exception"));
+            assertThat(e.getCause().getMessage()).contains("artificial async 
exception");
 
             // test succeeded
             return;
         }
 
-        Assert.fail();
+        fail("unknown failure");

Review Comment:
   nit: Those are odd ways of doing it. I guess, using the assertThrows here 
would be more appropriate.



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