Skip to content

Commit f14332f

Browse files
committed
rabbit_stream_queue_SUITE: Wait for replicas in shrink_coordinator_cluster/1
[Why] In CI, we sometimes get a failure when we try to forget node 3. The CLI doesn't report the nature of the error unfortunately. I suppose it's related to the fact that node 3 is stopped and forgotten before all three replicas were ready when the stream queue was declared. This is just a guess though and have no proof that it is the actual error. [How] We wait for the replicas after declaring the stream queue. (cherry picked from commit 0fb74ba)
1 parent 54ae029 commit f14332f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deps/rabbit/test/rabbit_stream_queue_SUITE.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,12 @@ shrink_coordinator_cluster(Config) ->
713713
rabbit_ct_broker_helpers:get_node_configs(Config, nodename),
714714
Q = ?config(queue_name, Config),
715715

716-
717716
?assertEqual({'queue.declare_ok', Q, 0, 0},
718717
declare(Config, Server0, Q, [{<<"x-queue-type">>, longstr, <<"stream">>}])),
719718

719+
%% Wait for the replicas to be ready before stopping a node.
720+
check_leader_and_replicas(Config, [Server0, Server1, Server2]),
721+
720722
ok = rabbit_control_helper:command(stop_app, Server2),
721723
ok = rabbit_control_helper:command(forget_cluster_node, Server0, [atom_to_list(Server2)], []),
722724

0 commit comments

Comments
 (0)