MINOR: Adjust test params pursuant to
PR Introduced support for Zstandard compression. The relevant test expects values for `num_nodes` and `num_producers` based on the (now-incremented) count of compression types.
Passed the affected, previously-failing test:
`ducker-ak test tests/kafkatest/tests/client/compression_test.py`
Reviewers: Jason Gustafson
@@ -29,6 +29,7 @@ class CompressionTest(ProduceConsumeValidateTest):
"""
These tests validate produce / consume for compressed topics.
"""
+ COMPRESSION_TYPES = ["snappy", "gzip", "lz4", "zstd", "none"]
def __init__(self, test_context):
""":type test_context: ducktape.tests.test.TestContext"""
@@ -42,7 +43,7 @@ class CompressionTest(ProduceConsumeValidateTest):
self.num_partitions = 10
self.timeout_sec = 60
self.producer_throughput = 1000
- self.num_producers = 4
+ self.num_producers = len(self.COMPRESSION_TYPES)
self.messages_per_producer = 1000
self.num_consumers = 1
@@ -53,15 +54,15 @@ class CompressionTest(ProduceConsumeValidateTest):
# Override this since we're adding services outside of the constructor
return super(CompressionTest, self).min_cluster_size() + self.num_producers + self.num_consumers
- @cluster(num_nodes=7)
- @parametrize(compression_types=["snappy","gzip","lz4","zstd","none"])
+ @cluster(num_nodes=8)
+ @parametrize(compression_types=COMPRESSION_TYPES)
def test_compressed_topic(self, compression_types):
"""Test produce => consume => validate for compressed topics
Setup: 1 zk, 1 kafka node, 1 topic with partitions=10, replication-factor=1
compression_types parameter gives a list of compression types (or no compression if
- "none"). Each producer in a VerifiableProducer group (num_producers = 4) will use a
- compression type from the list based on producer's index in the group.
+ "none"). Each producer in a VerifiableProducer group (num_producers = number of compression
+ types) will use a compression type from the list based on producer's index in the group.
- Produce messages in the background
- Consume messages in the background
