Skip to content

Commit 1532037

Browse files
committed
rabbit_core_metrics_gc_SUITE: Wait for condition in a loop
This hopefully further improves commit 6f374fb.
1 parent c7c3f92 commit 1532037

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/rabbit_core_metrics_gc_SUITE.erl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,15 @@ cluster_queue_metrics(Config) ->
377377
[queue_coarse_metrics])
378378
end, 60),
379379

380-
381-
[{Name, 1, 0, 1, _}] = rabbit_ct_broker_helpers:rpc(Config, Node1, ets,
382-
tab2list,
383-
[queue_coarse_metrics]),
380+
wait_for(fun () ->
381+
Ret = rabbit_ct_broker_helpers:rpc(
382+
Config, Node1, ets, tab2list,
383+
[queue_coarse_metrics]),
384+
case Ret of
385+
[{Name, 1, 0, 1, _}] -> true;
386+
_ -> false
387+
end
388+
end, 60),
384389

385390
amqp_channel:call(Ch, #'queue.delete'{queue=QueueName}),
386391
rabbit_ct_client_helpers:close_channel(Ch),

0 commit comments

Comments
 (0)