mimaison commented on code in PR #13351: URL: https://github.com/apache/kafka/pull/13351#discussion_r1127673083
########## connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorSourceConnectorTest.java: ########## @@ -149,6 +158,51 @@ public void testAclTransformation() { assertEquals(processedDenyAllAclBinding.entry().permissionType(), AclPermissionType.DENY, "should not change DENY"); } + @Test + public void testNoBrokerAclAuthorizer() throws Exception { + Admin sourceAdmin = mock(Admin.class); + Admin targetAdmin = mock(Admin.class); + MirrorSourceConnector connector = new MirrorSourceConnector(sourceAdmin, targetAdmin); + + ExecutionException describeAclsFailure = new ExecutionException( + "Failed to describe ACLs", + new SecurityDisabledException("No ACL authorizer configured on this broker") + ); + @SuppressWarnings("unchecked") + KafkaFuture<Collection<AclBinding>> describeAclsFuture = mock(KafkaFuture.class); + when(describeAclsFuture.get()).thenThrow(describeAclsFailure); + DescribeAclsResult describeAclsResult = mock(DescribeAclsResult.class); + when(describeAclsResult.values()).thenReturn(describeAclsFuture); + when(sourceAdmin.describeAcls(any())).thenReturn(describeAclsResult); + + try (LogCaptureAppender connectorLogs = LogCaptureAppender.createAndRegister(MirrorSourceConnector.class);) { Review Comment: Nit: unnecessary semicolon -- 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