sjhajharia commented on code in PR #19805:
URL: https://github.com/apache/kafka/pull/19805#discussion_r2114385406


##########
core/src/test/scala/unit/kafka/security/authorizer/AuthorizerTest.scala:
##########
@@ -567,7 +567,7 @@ class AuthorizerTest extends QuorumTestHarness with 
BaseAuthorizerTest {
     val acl3 = new AclBinding(resource2, new 
AccessControlEntry(principal.toString, WILDCARD_HOST, DESCRIBE, ALLOW))
     val acl4 = new AclBinding(prefixedResource, new 
AccessControlEntry(wildcardPrincipal.toString, WILDCARD_HOST, READ, ALLOW))
 
-    authorizer1.createAcls(requestContext, List(acl1, acl2, acl3, acl4).asJava)
+    authorizer1.createAcls(requestContext, util.List.of(acl1, acl2, acl3, 
acl4))
     assertEquals(Set(acl1, acl2, acl3, acl4), 
authorizer1.acls(AclBindingFilter.ANY).asScala.toSet)

Review Comment:
   Moving it to Set comes with one major issue -> The ordering. 
   Since its a assertEquals, if the ordering is not preserved, the test will 
turn flaky. And I somehow am not convinced to add a load amount of lines to use 
HashSet.



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