From 4409bdd29bf50ab322f9b55c5809b93b83c3145f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 4 Apr 2025 15:01:57 +0200 Subject: [PATCH 1/2] quorum_queue_SUITE: Improve reliability of a test ... by waiting for a state. (cherry picked from commit 9704d230faa6a1e4ffd06276323cf8ee4f831fe3) (cherry picked from commit 98e80bcd30f439c4fec4e79db22f5ae34b1a758d) --- deps/rabbit/test/quorum_queue_SUITE.erl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/deps/rabbit/test/quorum_queue_SUITE.erl b/deps/rabbit/test/quorum_queue_SUITE.erl index b46ad2a8cb9f..b0a93786b8bf 100644 --- a/deps/rabbit/test/quorum_queue_SUITE.erl +++ b/deps/rabbit/test/quorum_queue_SUITE.erl @@ -2423,11 +2423,21 @@ confirm_availability_on_leader_change(Config) -> ok. wait_for_new_messages(Config, Node, Name, Increase) -> + wait_for_new_messages(Config, Node, Name, Increase, 60000). + +wait_for_new_messages(Config, Node, Name, Increase, Timeout) -> Infos = rabbit_ct_broker_helpers:rabbitmqctl_list( Config, Node, ["list_queues", "name", "messages"]), - [[Name, Msgs0]] = [Props || Props <- Infos, hd(Props) == Name], - Msgs = binary_to_integer(Msgs0), - queue_utils:wait_for_min_messages(Config, Name, Msgs + Increase). + case [Props || Props <- Infos, hd(Props) == Name] of + [[Name, Msgs0]] -> + Msgs = binary_to_integer(Msgs0), + queue_utils:wait_for_min_messages(Config, Name, Msgs + Increase); + _ when Timeout >= 0 -> + Sleep = 200, + timer:sleep(Sleep), + wait_for_new_messages( + Config, Node, Name, Increase, Timeout - Sleep) + end. flush(T) -> receive X -> From 951b22bedd2ef24f4b1bae7cb8f10aa9e0db2ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 4 Apr 2025 11:15:47 +0200 Subject: [PATCH 2/2] Update khepri_mnesia_migration from 0.7.1 to 0.7.2 Release notes: https://github.com/rabbitmq/khepri_mnesia_migration/releases/tag/v0.7.2 In particular, it makes sure that the Erlang node with the lowest Khepri machine version is use as the cluster seed node. Otherwise these nodes would not be able to apply commands from newer Khepri machines. See rabbitmq/khepri_mnesia_migration#30. (cherry picked from commit 860d9fcd9cfc5a75093c159a192cb6ef9812b778) (cherry picked from commit 8cce31755b04db44a310c07ef49f2a58f14d5c02) --- rabbitmq-components.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rabbitmq-components.mk b/rabbitmq-components.mk index 0319eabc8477..803e93b03305 100644 --- a/rabbitmq-components.mk +++ b/rabbitmq-components.mk @@ -47,7 +47,7 @@ dep_cuttlefish = hex 3.4.0 dep_gen_batch_server = hex 0.8.8 dep_jose = hex 1.11.10 dep_khepri = hex 0.16.0 -dep_khepri_mnesia_migration = hex 0.7.1 +dep_khepri_mnesia_migration = hex 0.7.2 dep_meck = hex 1.0.0 dep_osiris = git https://github.com/rabbitmq/osiris v1.8.6 dep_prometheus = hex 4.11.0