summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilip Kuryloski <kuryloskip@vmware.com>2020-07-06 13:03:18 +0200
committerPhilip Kuryloski <kuryloskip@vmware.com>2020-07-06 13:03:18 +0200
commit69e5e148ad85ac2e56abb726a11d88a04f485c94 (patch)
treec1d1a62d0cf628881becaa757e983d5364f24dca /test
parentcd2fee1a50fc4d2dd291fb82333f94a5d1c4c0ce (diff)
downloadrabbitmq-server-git-69e5e148ad85ac2e56abb726a11d88a04f485c94.tar.gz
Attempt to further de-flake metrics/connection_metric_idemp_test
Wait until the connection_metrics report the new connections, before triggering the idempotent action under which they should stay stable.
Diffstat (limited to 'test')
-rw-r--r--test/metrics_SUITE.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/metrics_SUITE.erl b/test/metrics_SUITE.erl
index 2d0ed5b2d4..d2ceab2faa 100644
--- a/test/metrics_SUITE.erl
+++ b/test/metrics_SUITE.erl
@@ -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() ->
@@ -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)],