Skip to content

Commit

Permalink
rptest: make target_min_capacity_wanted more deterministic
Browse files Browse the repository at this point in the history
Introduce linger.ms parameter to try and make batching in the test more
deterministic when test is run on systems with different
performance/load.

(cherry picked from commit 98b6add)
  • Loading branch information
nvartolomei committed Nov 28, 2024
1 parent cf72b76 commit 611986c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions tests/rptest/clients/kafka_cli_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ def produce(self,
record_size: int,
acks: int = -1,
throughput: int = -1,
batch_size: int = 81960):
batch_size: int = 81960,
linger_ms: int = 0):
self._redpanda.logger.debug("Producing to topic: %s", topic)
cmd = [self._script("kafka-producer-perf-test.sh")]
cmd += ["--topic", topic]
Expand All @@ -329,9 +330,11 @@ def produce(self,
cmd += ["--throughput", str(throughput)]
cmd += [
"--producer-props",
"acks=%d" % acks, "client.id=ducktape",
"acks=%d" % acks,
"client.id=ducktape",
"batch.size=%d" % batch_size,
"bootstrap.servers=%s" % self._redpanda.brokers()
"bootstrap.servers=%s" % self._redpanda.brokers(),
"linger.ms=%d" % linger_ms,
]
if self._command_config:
cmd += ["--producer.config", self._command_config.name]
Expand Down
3 changes: 2 additions & 1 deletion tests/rptest/tests/full_disk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ def test_target_min_capacity_wanted_time_based(self):
30 * 1024,
1024,
throughput=500,
acks=-1)
acks=-1,
linger_ms=50)

node = self.redpanda.nodes[0]
reported = admin.get_local_storage_usage(
Expand Down

0 comments on commit 611986c

Please sign in to comment.