MINOR: enable reassign_partitions_test.py for kraft
Reviewers: Ismael Juma
@@ -19,7 +19,7 @@ from ducktape.utils.util import wait_until
from kafkatest.services.kafka import config_property
from kafkatest.services.zookeeper import ZookeeperService
-from kafkatest.services.kafka import KafkaService
+from kafkatest.services.kafka import KafkaService, quorum
from kafkatest.services.verifiable_producer import VerifiableProducer
from kafkatest.services.console_consumer import ConsoleConsumer
from kafkatest.tests.produce_consume_validate import ProduceConsumeValidateTest
@@ -35,12 +35,13 @@ class ReassignPartitionsTest(ProduceConsumeValidateTest):
"""
def __init__(self, test_context):
+ self.num_zk = 1
""":type test_context: ducktape.tests.test.TestContext"""
super(ReassignPartitionsTest, self).__init__(test_context=test_context)
self.topic = "test_topic"
self.num_partitions = 20
- self.zk = ZookeeperService(test_context, num_nodes=1)
+ self.zk = ZookeeperService(test_context, self.num_zk) if quorum.for_test(test_context) == quorum.zk else None
# We set the min.insync.replicas to match the replication factor because
# it makes the test more stringent. If min.isr = 2 and
# replication.factor=3, then the test would tolerate the failure of
@@ -57,13 +58,15 @@ class ReassignPartitionsTest(ProduceConsumeValidateTest):
'configs': {
"min.insync.replicas": 3,
}}
- })
+ },
+ controller_num_nodes_override=self.num_zk)
self.timeout_sec = 60
self.producer_throughput = 1000
self.num_producers = 1
self.num_consumers = 1
def setUp(self):
+ if self.zk:
self.zk.start()
def min_cluster_size(self):
@@ -130,8 +133,9 @@ class ReassignPartitionsTest(ProduceConsumeValidateTest):
@cluster(num_nodes=8)
@matrix(bounce_brokers=[True, False],
- reassign_from_offset_zero=[True, False])
- def test_reassign_partitions(self, bounce_brokers, reassign_from_offset_zero):
+ reassign_from_offset_zero=[True, False],
+ metadata_quorum=quorum.all_non_upgrade)
+ def test_reassign_partitions(self, bounce_brokers, reassign_from_offset_zero, metadata_quorum):
"""Reassign partitions tests.
Setup: 1 zk, 4 kafka nodes, 1 topic with partitions=20, replication-factor=3,
and min.insync.replicas=3
