File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ def assert_no_rejected():
332332 msg_rate_per_node = messages_per_sec_per_producer * producer_per_swarm_node
333333
334334 # single producer runtime
335- # Each swarm will throttle the client creation rate to about 30 connections /second
335+ # Each swarm will throttle the client creation rate to about 30 producers /second
336336 warm_up_time_s = (
337337 producer_per_swarm_node * ProducerSwarm .CLIENT_SPAWN_WAIT_MS // 1000
338338 ) + 60
@@ -430,7 +430,8 @@ def make_swarm():
430430
431431 for s in swarm :
432432 # wait for the swarm to report that all producers have started (sent at least 1 message)
433- s .wait_for_all_started ()
433+ broker_scale_factor = max (1 , self .num_brokers / 6 )
434+ s .wait_for_all_started (timeout_scale = broker_scale_factor )
434435
435436 # Now wait for up to five minutes to hit our target connection count: even though all producers
436437 # have started, it's possible that the connections haven't hit their target yet because some
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def _pre_run_tasks(self):
127127 self ._node , ProducerSwarm .CUSTOM_PAYLOAD_DIR
128128 )
129129
130- def wait_for_all_started (self ):
130+ def wait_for_all_started (self , timeout_scale : float = 1.0 ):
131131 """Wait until the requested number of producers have started. Note that if the expected
132132 swarm runtime (messages / rate) is short, this may fail as all producers and start and
133133 finish before we are able to see this via the metrics endpoint and an exception is thrown."""
@@ -146,6 +146,7 @@ def wait_for_all_started(self):
146146 # due to leadership transfers which occur in a burst some time between 0 and 5
147147 # minutes after the topic is created.
148148 timeout_s = 30 + 3 * ceil (self ._producers * self .CLIENT_SPAWN_WAIT_MS / 1000 )
149+ timeout_s = int (timeout_s * timeout_scale )
149150
150151 def started_count ():
151152 started = self .get_metrics_summary ().clients_started
You can’t perform that action at this time.
0 commit comments