Skip to content

Commit 7d45609

Browse files
committed
Tests: wait until stats are published, not just collected on the agent
1 parent 45718fb commit 7d45609

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

deps/rabbitmq_management/test/clustering_prop_SUITE.erl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ prop_connection_channel_counts(Config) ->
113113
execute_op(Config, Op, Agg)
114114
end, [], Ops),
115115
force_stats(Config),
116-
Res = validate_counts(Config, Cons),
116+
%% TODO retry a few times
117+
Res = retry_for(
118+
fun() -> validate_counts(Config, Cons) end,
119+
60),
117120
cleanup(Cons),
118121
rabbit_ct_helpers:await_condition(
119122
fun () -> validate_counts(Config, []) end,
@@ -275,3 +278,13 @@ dump_table(Config, Table) ->
275278
Data0 = rabbit_ct_broker_helpers:rpc(Config, 1, ets, tab2list, [Table]),
276279
ct:pal(?LOW_IMPORTANCE, "Node 1: Dump of table ~tp:~n~tp~n", [Table, Data0]).
277280

281+
retry_for(Fun, 0) ->
282+
false;
283+
retry_for(Fun, Retries) ->
284+
case Fun() of
285+
true ->
286+
true;
287+
false ->
288+
timer:sleep(1000),
289+
retry_for(Fun, Retries - 1)
290+
end.

0 commit comments

Comments
 (0)