tinaselenge commented on code in PR #13760:
URL: https://github.com/apache/kafka/pull/13760#discussion_r1237642066


##########
clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java:
##########
@@ -2359,31 +2334,22 @@ public void testDeleteRecords() throws Exception {
                 assertTrue(e0.getCause() instanceof OffsetOutOfRangeException);
             }
 
-            // "leader not available" failure on metadata request for 
partition 2
+            // not authorized to delete records for partition 2
             KafkaFuture<DeletedRecords> myTopicPartition2Result = 
values.get(myTopicPartition2);
             try {
                 myTopicPartition2Result.get();
                 fail("get() should throw ExecutionException");
             } catch (ExecutionException e1) {
-                assertTrue(e1.getCause() instanceof 
LeaderNotAvailableException);
+                assertTrue(e1.getCause() instanceof 
TopicAuthorizationException);
             }

Review Comment:
   We are actually catching ExecutionException and checking the cause of the 
exception. This would not work because it's not throwing 
TopicAuthorizationException, but it is the supplied cause for the 
ExecutionException. 



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