Skip to content

clustering_management_SUITE: Use old node as seed node #13323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions deps/rabbit/test/clustering_management_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ groups() ->
status_with_alarm,
pid_file_and_await_node_startup_in_khepri,
await_running_count_in_khepri,
start_with_invalid_schema_in_path,
persistent_cluster_id,
stop_start_cluster_node,
restart_cluster_node,
Expand Down Expand Up @@ -337,7 +336,7 @@ restart_cluster_node(Config) ->
assert_clustered([Rabbit, Hare]).

join_and_part_cluster_in_khepri(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
[Rabbit, Bunny, Hare] = cluster_members(Config),
assert_not_clustered(Rabbit),
assert_not_clustered(Hare),
assert_not_clustered(Bunny),
Expand Down Expand Up @@ -447,38 +446,38 @@ join_to_start_interval(Config) ->
assert_clustered([Rabbit, Hare]).

join_cluster_in_minority(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
[Rabbit, Bunny, Hare] = cluster_members(Config),
assert_not_clustered(Rabbit),
assert_not_clustered(Hare),
assert_not_clustered(Bunny),

stop_join_start(Config, Bunny, Rabbit),
stop_join_start(Config, Rabbit, Bunny),
assert_clustered([Rabbit, Bunny]),
ok = rabbit_ct_broker_helpers:stop_node(Config, Bunny),
ok = rabbit_ct_broker_helpers:stop_node(Config, Rabbit),

ok = stop_app(Config, Hare),
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
?assertEqual(ok, join_cluster(Config, Hare, Bunny, false)),

ok = rabbit_ct_broker_helpers:start_node(Config, Bunny),
ok = rabbit_ct_broker_helpers:start_node(Config, Rabbit),
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
?assertEqual(ok, start_app(Config, Hare)),

assert_clustered([Rabbit, Bunny, Hare]).

join_cluster_with_rabbit_stopped(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
[Rabbit, Bunny, Hare] = cluster_members(Config),
assert_not_clustered(Rabbit),
assert_not_clustered(Hare),
assert_not_clustered(Bunny),

stop_join_start(Config, Bunny, Rabbit),
stop_join_start(Config, Rabbit, Bunny),
assert_clustered([Rabbit, Bunny]),
ok = stop_app(Config, Bunny),
ok = stop_app(Config, Rabbit),

ok = stop_app(Config, Hare),
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
?assertEqual(ok, join_cluster(Config, Hare, Bunny, false)),

ok = start_app(Config, Bunny),
ok = start_app(Config, Rabbit),
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
?assertEqual(ok, start_app(Config, Hare)),

Expand Down Expand Up @@ -1119,7 +1118,7 @@ await_running_count_in_khepri(Config) ->
await_running_count, [5, 1000])).

start_nodes_in_reverse_order(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
[Rabbit, Bunny, Hare] = cluster_members(Config),
assert_not_clustered(Rabbit),
assert_not_clustered(Hare),
assert_not_clustered(Bunny),
Expand All @@ -1142,7 +1141,7 @@ start_nodes_in_reverse_order(Config) ->

%% Test booting nodes in the wrong order for Mnesia. Interesting...
start_nodes_in_stop_order(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
[Rabbit, Bunny, Hare] = cluster_members(Config),
assert_not_clustered(Rabbit),
assert_not_clustered(Hare),
assert_not_clustered(Bunny),
Expand All @@ -1167,7 +1166,7 @@ start_nodes_in_stop_order(Config) ->
end.

start_nodes_in_stop_order_in_khepri(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
[Rabbit, Bunny, Hare] = cluster_members(Config),
assert_not_clustered(Rabbit),
assert_not_clustered(Hare),
assert_not_clustered(Bunny),
Expand All @@ -1190,7 +1189,7 @@ start_nodes_in_stop_order_in_khepri(Config) ->

%% TODO test force_boot with Khepri involved
start_nodes_in_stop_order_with_force_boot(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
[Rabbit, Bunny, Hare] = cluster_members(Config),
assert_not_clustered(Rabbit),
assert_not_clustered(Hare),
assert_not_clustered(Bunny),
Expand Down
Loading