Skip to content

Commit f126bda

Browse files
committed
Wait for metrics
1 parent a55c50a commit f126bda

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

deps/rabbitmq_federation_prometheus/test/prometheus_rabbitmq_federation_collector_SUITE.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ single_link_then_second_added(Config) ->
9494
timer:sleep(3000),
9595
[_L1] = rabbit_ct_broker_helpers:rpc(Config, 0,
9696
rabbit_federation_status, status, []),
97-
MFs = get_metrics(Config),
98-
[?ONE_RUNNING_METRIC] = MFs,
97+
rabbit_ct_helpers:eventually(?_assertEqual([?ONE_RUNNING_METRIC],
98+
get_metrics(Config)),
99+
500,
100+
5),
99101
maybe_declare_queue(Config, Ch, q(<<"fed.downstream2">>, [{<<"x-queue-type">>, longstr, <<"classic">>}])),
100102
%% here we race against queue.declare... most of the times there is going to be
101103
%% new status=starting metric. In this case we wait a bit more for running=2.

0 commit comments

Comments
 (0)