Skip to content

Commit 44d32f1

Browse files
committed
clustering_management_SUITE: Use old node as seed node
[Why] During mixed-version testing, the old node might not be able to join or rejoin a cluster if the other nodes run a newer Khepri machine version. [How] The old node is used as the cluster seed node and is never touched otherwise. Other nodes are restarted or join the cluster later. (cherry picked from commit e76233a)
1 parent 477fc47 commit 44d32f1

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

deps/rabbit/test/clustering_management_SUITE.erl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ restart_cluster_node(Config) ->
337337
assert_clustered([Rabbit, Hare]).
338338

339339
join_and_part_cluster_in_khepri(Config) ->
340-
[Rabbit, Hare, Bunny] = cluster_members(Config),
340+
[Rabbit, Bunny, Hare] = cluster_members(Config),
341341
assert_not_clustered(Rabbit),
342342
assert_not_clustered(Hare),
343343
assert_not_clustered(Bunny),
@@ -447,38 +447,38 @@ join_to_start_interval(Config) ->
447447
assert_clustered([Rabbit, Hare]).
448448

449449
join_cluster_in_minority(Config) ->
450-
[Rabbit, Hare, Bunny] = cluster_members(Config),
450+
[Rabbit, Bunny, Hare] = cluster_members(Config),
451451
assert_not_clustered(Rabbit),
452452
assert_not_clustered(Hare),
453453
assert_not_clustered(Bunny),
454454

455-
stop_join_start(Config, Bunny, Rabbit),
455+
stop_join_start(Config, Rabbit, Bunny),
456456
assert_clustered([Rabbit, Bunny]),
457-
ok = rabbit_ct_broker_helpers:stop_node(Config, Bunny),
457+
ok = rabbit_ct_broker_helpers:stop_node(Config, Rabbit),
458458

459459
ok = stop_app(Config, Hare),
460-
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
460+
?assertEqual(ok, join_cluster(Config, Hare, Bunny, false)),
461461

462-
ok = rabbit_ct_broker_helpers:start_node(Config, Bunny),
462+
ok = rabbit_ct_broker_helpers:start_node(Config, Rabbit),
463463
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
464464
?assertEqual(ok, start_app(Config, Hare)),
465465

466466
assert_clustered([Rabbit, Bunny, Hare]).
467467

468468
join_cluster_with_rabbit_stopped(Config) ->
469-
[Rabbit, Hare, Bunny] = cluster_members(Config),
469+
[Rabbit, Bunny, Hare] = cluster_members(Config),
470470
assert_not_clustered(Rabbit),
471471
assert_not_clustered(Hare),
472472
assert_not_clustered(Bunny),
473473

474-
stop_join_start(Config, Bunny, Rabbit),
474+
stop_join_start(Config, Rabbit, Bunny),
475475
assert_clustered([Rabbit, Bunny]),
476-
ok = stop_app(Config, Bunny),
476+
ok = stop_app(Config, Rabbit),
477477

478478
ok = stop_app(Config, Hare),
479-
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
479+
?assertEqual(ok, join_cluster(Config, Hare, Bunny, false)),
480480

481-
ok = start_app(Config, Bunny),
481+
ok = start_app(Config, Rabbit),
482482
?assertEqual(ok, join_cluster(Config, Hare, Rabbit, false)),
483483
?assertEqual(ok, start_app(Config, Hare)),
484484

@@ -1119,7 +1119,7 @@ await_running_count_in_khepri(Config) ->
11191119
await_running_count, [5, 1000])).
11201120

11211121
start_nodes_in_reverse_order(Config) ->
1122-
[Rabbit, Hare, Bunny] = cluster_members(Config),
1122+
[Rabbit, Bunny, Hare] = cluster_members(Config),
11231123
assert_not_clustered(Rabbit),
11241124
assert_not_clustered(Hare),
11251125
assert_not_clustered(Bunny),
@@ -1142,7 +1142,7 @@ start_nodes_in_reverse_order(Config) ->
11421142

11431143
%% Test booting nodes in the wrong order for Mnesia. Interesting...
11441144
start_nodes_in_stop_order(Config) ->
1145-
[Rabbit, Hare, Bunny] = cluster_members(Config),
1145+
[Rabbit, Bunny, Hare] = cluster_members(Config),
11461146
assert_not_clustered(Rabbit),
11471147
assert_not_clustered(Hare),
11481148
assert_not_clustered(Bunny),
@@ -1167,7 +1167,7 @@ start_nodes_in_stop_order(Config) ->
11671167
end.
11681168

11691169
start_nodes_in_stop_order_in_khepri(Config) ->
1170-
[Rabbit, Hare, Bunny] = cluster_members(Config),
1170+
[Rabbit, Bunny, Hare] = cluster_members(Config),
11711171
assert_not_clustered(Rabbit),
11721172
assert_not_clustered(Hare),
11731173
assert_not_clustered(Bunny),
@@ -1190,7 +1190,7 @@ start_nodes_in_stop_order_in_khepri(Config) ->
11901190

11911191
%% TODO test force_boot with Khepri involved
11921192
start_nodes_in_stop_order_with_force_boot(Config) ->
1193-
[Rabbit, Hare, Bunny] = cluster_members(Config),
1193+
[Rabbit, Bunny, Hare] = cluster_members(Config),
11941194
assert_not_clustered(Rabbit),
11951195
assert_not_clustered(Hare),
11961196
assert_not_clustered(Bunny),

0 commit comments

Comments
 (0)