hachikuji commented on code in PR #12190:
URL: https://github.com/apache/kafka/pull/12190#discussion_r879644296
##########
tests/kafkatest/tests/core/authorizer_test.py:
##########
@@ -36,22 +36,30 @@ class ZooKeeperAuthorizerTest(Test):
"""
def __init__(self, test_context):
- super(ZooKeeperAuthorizerTest,
self).__init__(test_context=test_context)
-
- self.topic = "test_topic"
- # setup ZooKeeper even with KRaft
- self.zk = ZookeeperService(test_context, num_nodes=1)
- self.kafka = KafkaService(test_context, num_nodes=1, zk=self.zk,
- topics={self.topic: {"partitions": 1,
"replication-factor": 1}},
- controller_num_nodes_override=1,
allow_zk_with_kraft=True)
+ super(AuthorizerTest, self).__init__(test_context=test_context)
+ self.test_context = test_context
+
def setUp(self):
- # start ZooKeeper even with KRaft
- self.zk.start()
self.acls = ACLs(self.test_context)
@cluster(num_nodes=4)
- @matrix(metadata_quorum=quorum.all_non_upgrade)
- def test_authorizer(self, metadata_quorum):
+ @parametrize(metadata_quorum=quorum.remote_kraft,
authorizer_class=KafkaService.KRAFT_ACL_AUTHORIZER)
+ @parametrize(metadata_quorum=quorum.remote_kraft,
authorizer_class=KafkaService.ZK_ACL_AUTHORIZER)
+ @parametrize(metadata_quorum=quorum.zk,
authorizer_class=KafkaService.ZK_ACL_AUTHORIZER)
+ def test_authorizer(self, metadata_quorum, authorizer_class):
+ topics = {"test_topic": {"partitions": 1, "replication-factor": 1}}
+
+ if (authorizer_class == KafkaService.KRAFT_ACL_AUTHORIZER):
+ self.zk = None
+ else:
+ self.zk = ZookeeperService(self.test_context, num_nodes=1)
+ self.zk.start()
+
+ self.kafka = KafkaService(self.test_context, num_nodes=1, zk=self.zk,
+ topics=topics,
controller_num_nodes_override=1,
+ allow_zk_with_kraft=True)
+ self.kafka.logs["kafka_operational_logs_debug"]["collect_default"] =
True
Review Comment:
It was mainly so that I could see all the authorizer logs. Perhaps I could
change this to only collect after a failure.
--
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]