Test: wait for metrics

This commit is contained in:
Diana Parra Corbacho 2024-10-30 19:37:41 +01:00
parent 34c1fd13d9
commit e1c22a0d2a
1 changed files with 4 additions and 2 deletions

View File

@ -94,8 +94,10 @@ single_link_then_second_added(Config) ->
timer:sleep(3000),
[_L1] = rabbit_ct_broker_helpers:rpc(Config, 0,
rabbit_federation_status, status, []),
MFs = get_metrics(Config),
[?ONE_RUNNING_METRIC] = MFs,
rabbit_ct_helpers:eventually(?_assertEqual([?ONE_RUNNING_METRIC],
get_metrics(Config)),
500,
5),
maybe_declare_queue(Config, Ch, q(<<"fed.downstream2">>, [{<<"x-queue-type">>, longstr, <<"classic">>}])),
%% here we race against queue.declare... most of the times there is going to be
%% new status=starting metric. In this case we wait a bit more for running=2.