Skip to content

Commit

Permalink
Merge pull request #2402 from rabbitmq/metrics-flakiness
Browse files Browse the repository at this point in the history
Attempt to further de-flake metrics/connection_metric_idemp_test
  • Loading branch information
michaelklishin committed Jul 7, 2020
2 parents cd2fee1 + 69e5e14 commit b8edec0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/metrics_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
-include_lib("eunit/include/eunit.hrl").
-include_lib("amqp_client/include/amqp_client.hrl").
-include_lib("rabbit_common/include/rabbit_core_metrics.hrl").
-include_lib("rabbitmq_ct_helpers/include/rabbit_assert.hrl").


all() ->
Expand Down Expand Up @@ -144,7 +145,10 @@ prop_queue_metric_count_channel_per_queue(Config) ->
connection_metric_idemp(Config, {N, R}) ->
Conns = [rabbit_ct_client_helpers:open_unmanaged_connection(Config)
|| _ <- lists:seq(1, N)],
Table = [ Pid || {Pid, _} <- read_table_rpc(Config, connection_metrics)],
Table = ?awaitMatch(L when is_list(L) andalso length(L) == N,
[ Pid || {Pid, _} <- read_table_rpc(Config,
connection_metrics)],
5000),
Table2 = [ Pid || {Pid, _} <- read_table_rpc(Config, connection_coarse_metrics)],
% refresh stats 'R' times
[[Pid ! emit_stats || Pid <- Table] || _ <- lists:seq(1, R)],
Expand Down

0 comments on commit b8edec0

Please sign in to comment.