Skip to content

Commit 60fac85

Browse files
committed
CLI: s/metadata_store/rabbitmq_metadata/
Fixes error handling and a `clsutering_management_SUITE` transient failure.
1 parent 0d2537a commit 60fac85

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

deps/rabbit/test/clustering_management_SUITE.erl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,13 +614,16 @@ forget_unavailable_node_in_minority(Config) ->
614614
30000),
615615

616616
%% If Hare was the leader, it is able to forget one of the nodes. Change takes place as soon as it is written on the log. The other membership change will be rejected until the last change has consensus.
617+
ct:pal("Initial Raft status: ~p", [RaftStatus]),
617618
case RaftStatus of
618619
leader ->
619620
?assertMatch(ok, forget_cluster_node(Config, Hare, Rabbit)),
620621
not_permitted(forget_cluster_node(Config, Hare, Bunny));
621622
follower ->
622623
%% Follower might have been promoted before the second node goes down, check the status again
623-
case get_raft_status(Config, Hare) of
624+
RaftStatus1 = get_raft_status(Config, Hare),
625+
ct:pal("Latest Raft status: ~p", [RaftStatus1]),
626+
case RaftStatus1 of
624627
leader ->
625628
?assertMatch(ok, forget_cluster_node(Config, Hare, Rabbit)),
626629
not_permitted(forget_cluster_node(Config, Hare, Bunny));

deps/rabbitmq_cli/lib/rabbitmq/cli/default_output.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ defmodule RabbitMQ.CLI.DefaultOutput do
6868
defp normalize_output({unknown, _} = input, _opts) when is_atom(unknown), do: {:error, input}
6969
defp normalize_output(result, _opts) when not is_atom(result), do: {:ok, result}
7070

71-
defp format_khepri_output({:error, {:timeout, {:metadata_store, _}}}, %{node: node_name}) do
71+
defp format_khepri_output({:error, {:timeout, {:rabbitmq_metadata, _}}}, %{node: node_name}) do
7272
{:error, RabbitMQ.CLI.Core.ExitCodes.exit_tempfail(), khepri_timeout_error(node_name)}
7373
end
7474

0 commit comments

Comments
 (0)