From a53b42f629403b2a40f858597e90f57b76fc3a0b Mon Sep 17 00:00:00 2001 From: Evgeny Lazin <4lazin@gmail.com> Date: Thu, 28 Mar 2024 06:38:52 -0400 Subject: [PATCH] rptest: Fix throttling test Avoid restarting redpanda durint the e2e test. Restart resets the metrics and the second run of the consumer after restart is not guaranteed to hit throttling because the data is cached. --- tests/rptest/tests/e2e_shadow_indexing_test.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/rptest/tests/e2e_shadow_indexing_test.py b/tests/rptest/tests/e2e_shadow_indexing_test.py index 4a830072e78d..96f6e4036d57 100644 --- a/tests/rptest/tests/e2e_shadow_indexing_test.py +++ b/tests/rptest/tests/e2e_shadow_indexing_test.py @@ -1310,7 +1310,7 @@ class EndToEndThrottlingTest(RedpandaTest): def __init__(self, test_context): self.si_settings = SISettings( test_context, - log_segment_size=1024, + log_segment_size=1024 * 1024, fast_uploads=True, # Set small throughput limit to trigger throttling cloud_storage_max_throughput_per_shard=8 * 1024 * 1024) @@ -1388,17 +1388,6 @@ def test_throttling(self, cloud_storage_type): self.logger.info("Start consumer") self.consume() - self.logger.info("Stop nodes") - for node in self.redpanda.nodes: - self.redpanda.stop_node(node, timeout=120) - - self.logger.info("Start nodes") - for node in self.redpanda.nodes: - self.redpanda.start_node(node, timeout=120) - - self.logger.info("Restart consumer") - self.consume() - times_throttled = self.get_throttling_metric() self.logger.info(f"Consumer was throttled {times_throttled} times") assert times_throttled > 0, f"Expected consumer to be throttled, metric value: {times_throttled}"