test: attempt to reduce test flakiness

This commit is contained in:
Thales Macedo Garitezi 2024-08-06 10:24:21 -03:00
parent 281f8ddc83
commit 9ca3985bbd
1 changed files with 3 additions and 2 deletions

View File

@ -1918,13 +1918,14 @@ t_node_joins_existing_cluster(Config) ->
_Attempts2 = 50, _Attempts2 = 50,
[] =/= erpc:call(N2, emqx_router, lookup_routes, [MQTTTopic]) [] =/= erpc:call(N2, emqx_router, lookup_routes, [MQTTTopic])
), ),
NumMsgs = 50 * NPartitions,
{ok, SRef1} = {ok, SRef1} =
snabbkaffe:subscribe( snabbkaffe:subscribe(
?match_event(#{ ?match_event(#{
?snk_kind := kafka_consumer_handle_message, ?snk_kind := kafka_consumer_handle_message,
?snk_span := {complete, _} ?snk_span := {complete, _}
}), }),
NPartitions, NumMsgs,
20_000 20_000
), ),
lists:foreach( lists:foreach(
@ -1933,7 +1934,7 @@ t_node_joins_existing_cluster(Config) ->
Val = <<"v", (integer_to_binary(N))/binary>>, Val = <<"v", (integer_to_binary(N))/binary>>,
publish(Config, KafkaTopic, [#{key => Key, value => Val}]) publish(Config, KafkaTopic, [#{key => Key, value => Val}])
end, end,
lists:seq(1, 10 * NPartitions) lists:seq(1, NumMsgs)
), ),
{ok, _} = snabbkaffe:receive_events(SRef1), {ok, _} = snabbkaffe:receive_events(SRef1),