chia7712 commented on code in PR #15512:
URL: https://github.com/apache/kafka/pull/15512#discussion_r1530236303


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/WakeupTriggerTest.java:
##########
@@ -177,7 +177,7 @@ private void assertWakeupExceptionIsThrown(final 
CompletableFuture<?> future) {
         try {
             future.get(DEFAULT_TIMEOUT_MS, TimeUnit.MILLISECONDS);

Review Comment:
   ditto



##########
clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java:
##########
@@ -2172,7 +2173,7 @@ public void testCreatePartitions() throws Exception {
                 otherTopicResult.get();
                 fail("get() should throw ExecutionException");

Review Comment:
   ditto



##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinatorTest.java:
##########
@@ -1037,7 +1038,7 @@ public void 
testHeartbeatRequestWithFencedInstanceIdException() throws Interrupt
             }
             fail("Expected pollHeartbeat to raise fenced instance id exception 
in 1 second");
         } catch (RuntimeException exception) {
-            assertTrue(exception instanceof FencedInstanceIdException);
+            assertInstanceOf(FencedInstanceIdException.class, exception);

Review Comment:
   this should be rewrite by `assertThrow`



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to