pasharik commented on code in PR #15830:
URL: https://github.com/apache/kafka/pull/15830#discussion_r1641784154
##########
core/src/test/scala/unit/kafka/admin/AclCommandTest.scala:
##########
@@ -325,11 +349,15 @@ class AclCommandTest extends QuorumTestHarness with
Logging {
private def withAuthorizer()(f: Authorizer => Unit): Unit = {
val kafkaConfig = KafkaConfig.fromProps(brokerProps, doLog = false)
- val authZ = new AclAuthorizer
+ val auth = if (isKRaftTest()) {
+ servers.last.authorizer.get
+ } else {
+ new AclAuthorizer
Review Comment:
As I understand, this AclAuthorizer is used for some tests like
`testAclCliWithAuthorizer`, `testProducerConsumerCliWithAuthorizer`,
`testAclsOnPrefixedResourcesWithAuthorizer`, `testPatternTypesWithAuthorizer`.
Those tests don't use AdminClient, so for them there seems to be no broker
created at all, only Zookeeper instance. So there is no broker/controller from
which we can obtain the AclAutorizer, hence creating a new instance of the
autorizer here
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]