From 7d906c7455da9e081f76f73e5f09f7a050d84762 Mon Sep 17 00:00:00 2001 From: Diana Parra Corbacho Date: Mon, 4 Nov 2024 15:17:45 +0100 Subject: [PATCH] metrics_SUITE: wait for tables in proper test (cherry picked from commit 054fcd676c8947093aa4b4f95fea9d0f574ffee7) --- deps/rabbit/test/metrics_SUITE.erl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/deps/rabbit/test/metrics_SUITE.erl b/deps/rabbit/test/metrics_SUITE.erl index b740a24207c..fd6356e9e55 100644 --- a/deps/rabbit/test/metrics_SUITE.erl +++ b/deps/rabbit/test/metrics_SUITE.erl @@ -290,11 +290,13 @@ add_rem_counter(Config, {Initial, Ops}, {AddFun, RemFun}, Tables) -> {Initial, Things}, Ops), force_metric_gc(Config), - TabLens = lists:map(fun(T) -> - length(read_table_rpc(Config, T)) - end, Tables), + ?awaitMatch([FinalLen], + lists:usort(lists:map(fun(T) -> + length(read_table_rpc(Config, T)) + end, Tables)), + 45000), [RemFun(Thing) || Thing <- Things1], - [FinalLen] == lists:usort(TabLens). + true. connection(Config) ->