This is an automated email from the ASF dual-hosted git repository.

manikumar pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d798ec779c2 KAFKA-14535: Fix flaky EndToEndAuthorization tests which 
were sensitive to ACL change reordering (#13086)
d798ec779c2 is described below

commit d798ec779c25dba31fa5ee9384d159ed54c6e07b
Author: Greg Harris <greg.har...@aiven.io>
AuthorDate: Sat Jan 7 07:35:04 2023 -0800

    KAFKA-14535: Fix flaky EndToEndAuthorization tests which were sensitive to 
ACL change reordering (#13086)
    
    The ACL change methods (create, delete) are eventually consistent across a 
Kafka cluster.
    As part of that, changes to the same resource made to different brokers may 
be reordered.
    In this test, a delete operation initiated in 
noConsumeWithoutDescribeAclSetup was being
    reordered to an unexpected time later in the test, causing an expected ACL 
to be missing.
    
    To fix this, add a wait condition that asserts that the delete operations 
initiated in
    noConsumeWithoutDescribeAclSetup are completely applied before returning 
from the method.
    
    Note: test failures were present for both the ZK and KRAFT iterations of 
the test, but
    the ZK iteration encountered it much more often, and was used to diagnose 
the reordering.
    
    Signed-off-by: Greg Harris <greg.har...@aiven.io>
    Reviewers: Manikumar Reddy <manikumar.re...@gmail.com>
---
 .../src/test/scala/integration/kafka/api/EndToEndAuthorizationTest.scala | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/core/src/test/scala/integration/kafka/api/EndToEndAuthorizationTest.scala 
b/core/src/test/scala/integration/kafka/api/EndToEndAuthorizationTest.scala
index f4c51a51b88..7731efd360f 100644
--- a/core/src/test/scala/integration/kafka/api/EndToEndAuthorizationTest.scala
+++ b/core/src/test/scala/integration/kafka/api/EndToEndAuthorizationTest.scala
@@ -502,6 +502,7 @@ abstract class EndToEndAuthorizationTest extends 
IntegrationTestHarness with Sas
     
superuserAdminClient.deleteAcls(List(AclTopicWrite().toFilter).asJava).values
 
     brokers.foreach { s =>
+      TestUtils.waitAndVerifyAcls(TopicCreateAcl, 
s.dataPlaneRequestProcessor.authorizer.get, topicResource)
       TestUtils.waitAndVerifyAcls(GroupReadAcl, 
s.dataPlaneRequestProcessor.authorizer.get, groupResource)
     }
   }

Reply via email to