Skip to content

Commit b9c8e2d

Browse files
Merge pull request #2402 from rabbitmq/metrics-flakiness
Attempt to further de-flake metrics/connection_metric_idemp_test (cherry picked from commit b8edec0) (cherry picked from commit 1537107)
1 parent df9f61d commit b9c8e2d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/metrics_SUITE.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
-include_lib("eunit/include/eunit.hrl").
2222
-include_lib("amqp_client/include/amqp_client.hrl").
2323
-include_lib("rabbit_common/include/rabbit_core_metrics.hrl").
24+
-include_lib("rabbitmq_ct_helpers/include/rabbit_assert.hrl").
2425

2526

2627
all() ->
@@ -142,7 +143,10 @@ prop_queue_metric_count_channel_per_queue(Config) ->
142143
connection_metric_idemp(Config, {N, R}) ->
143144
Conns = [rabbit_ct_client_helpers:open_unmanaged_connection(Config)
144145
|| _ <- lists:seq(1, N)],
145-
Table = [ Pid || {Pid, _} <- read_table_rpc(Config, connection_metrics)],
146+
Table = ?awaitMatch(L when is_list(L) andalso length(L) == N,
147+
[ Pid || {Pid, _} <- read_table_rpc(Config,
148+
connection_metrics)],
149+
5000),
146150
Table2 = [ Pid || {Pid, _} <- read_table_rpc(Config, connection_coarse_metrics)],
147151
% refresh stats 'R' times
148152
[[Pid ! emit_stats || Pid <- Table] || _ <- lists:seq(1, R)],

0 commit comments

Comments
 (0)