showuon commented on code in PR #13760: URL: https://github.com/apache/kafka/pull/13760#discussion_r1238257723
########## 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: Ah, I see. Thanks for the explanation. -- 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