Skip to content

Commit

Permalink
tests/many_clients: run many clients test with idempotent producers
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Maslanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Oct 3, 2023
1 parent 448cb2e commit 7b61e21
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/rptest/scale_tests/many_clients_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ def setUp(self):
pass

@cluster(num_nodes=7)
def test_many_clients_no_compaction(self):
self._test_many_clients(compaction_mode=CompactionMode.NONE)
@matrix(idempotent_producers=[True, False])
def test_many_clients_no_compaction(self, idempotent_producers):
self._test_many_clients(compaction_mode=CompactionMode.NONE,
idempotent_producers=idempotent_producers)

@cluster(num_nodes=7)
def test_many_clients_realistic_compaction(self):
Expand All @@ -80,7 +82,7 @@ def test_many_clients_realistic_compaction(self):
def test_many_clients_pathological_compaction(self):
self._test_many_clients(compaction_mode=CompactionMode.PATHOLOGICAL)

def _test_many_clients(self, compaction_mode):
def _test_many_clients(self, compaction_mode, idempotent_producers=True):
"""
Check that redpanda remains stable under higher numbers of clients
than usual.
Expand Down Expand Up @@ -222,6 +224,10 @@ def _test_many_clients(self, compaction_mode):
f"compaction={compaction_mode} mode, {producer_count} producers writing {messages_per_sec_per_producer} msg/s each, {records_per_producer} records each"
)

if idempotent_producers:
producer_kwargs['properties'] = {}
producer_kwargs['properties']["enable.idempotence"] = True

producer = ProducerSwarm(self.test_context,
self.redpanda,
TOPIC_NAME,
Expand Down

0 comments on commit 7b61e21

Please sign in to comment.