From ee578e8078c5f07d85d05f7597d55bce6205573c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 17 Oct 2024 13:26:27 +0200 Subject: [PATCH] Tests: wait until stats are published, not just collected on the agent --- deps/rabbitmq_management/test/clustering_SUITE.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/rabbitmq_management/test/clustering_SUITE.erl b/deps/rabbitmq_management/test/clustering_SUITE.erl index 3febd56db0ff..4c7e242a98c3 100644 --- a/deps/rabbitmq_management/test/clustering_SUITE.erl +++ b/deps/rabbitmq_management/test/clustering_SUITE.erl @@ -253,6 +253,8 @@ queue_with_multiple_consumers(Config) -> end, force_stats(Config), + ?awaitMatch(#{consumer_details := [_, _|_]}, + http_get(Config, "/queues/%2F/multi-consumer-queue1"), 60000), Res = http_get(Config, "/queues/%2F/multi-consumer-queue1"), http_delete(Config, "/queues/%2F/multi-consumer-queue1", ?NO_CONTENT), @@ -519,6 +521,8 @@ consumers(Config) -> consume(Chan2, <<"some-queue">>), force_stats(Config), + ?awaitMatch([_, _|_], http_get(Config, "/consumers"), 60000), + Res = http_get(Config, "/consumers"), % assert there are two non-empty consumer records