Skip to content

Commit 4eca000

Browse files
committed
Test rolling upgrade of federation mirrored supervisors
Without the patch the test case rolling_upgrade:child_id_format fails with: ``` === Location: [{erpc,call,1366}, {exchange_SUITE,'-child_id_format/1-fun-5-',675}, {lists,foreach_1,2310}, {exchange_SUITE,child_id_format,670}, {test_server,ts_tc,1794}, {test_server,run_test_case_eval1,1303}, {test_server,run_test_case_eval,1235}] === === Reason: {exception, {noproc, {gen_server,call, [rabbit_federation_exchange_link_sup_sup, which_children,infinity]}}} ```
1 parent 0c71c1a commit 4eca000

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

deps/rabbitmq_ct_helpers/src/rabbit_ct_broker_helpers.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167

168168
enable_plugin/3,
169169
disable_plugin/3,
170+
set_plugins/3,
170171

171172
test_channel/0,
172173
test_writer/1,
@@ -2415,6 +2416,9 @@ enable_plugin(Config, Node, Plugin) ->
24152416
disable_plugin(Config, Node, Plugin) ->
24162417
plugin_action(Config, Node, [disable, Plugin]).
24172418

2419+
set_plugins(Config, Node, PluginList) ->
2420+
plugin_action(Config, Node, [set | PluginList]).
2421+
24182422
plugin_action(Config, Node, Args) ->
24192423
NodeConfig = get_node_config(Config, Node),
24202424
Nodename = ?config(nodename, NodeConfig),

deps/rabbitmq_exchange_federation/test/exchange_SUITE.erl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,14 +580,14 @@ lookup_exchange_status(Config) ->
580580

581581
child_id_format(Config) ->
582582
case rabbit_ct_helpers:is_mixed_versions() of
583-
false ->
583+
true ->
584584
[UpstreamNode,
585585
OldNodeA,
586586
NewNodeB,
587587
OldNodeC,
588588
NewNodeD] = rabbit_ct_broker_helpers:get_node_configs(
589589
Config, nodename),
590-
590+
591591
%% Create a cluster with the nodes running the old version of RabbitMQ in
592592
%% mixed-version testing.
593593
%%
@@ -603,7 +603,12 @@ child_id_format(Config) ->
603603
%% secondary umbrella, `NewNodeB' the primary copy, and so on.
604604
Config1 = rabbit_ct_broker_helpers:cluster_nodes(
605605
Config, [OldNodeA, OldNodeC]),
606-
606+
607+
%% The old nodes get the "rabbitmq_exchange_federation" plugin enabled but that is not found
608+
%% Let's switch to the old plugin name
609+
[rabbit_ct_broker_helpers:set_plugins(Config, Node, ["rabbitmq_federation"])
610+
|| Node <- [OldNodeA, OldNodeC]],
611+
607612
%% Prepare the whole federated exchange on that old cluster.
608613
UpstreamName = <<"fed_on_upgrade">>,
609614
rabbit_ct_broker_helpers:set_parameter(
@@ -691,9 +696,8 @@ child_id_format(Config) ->
691696
when is_list(List) ->
692697
{skip, "Testcase skipped with the transiently changed ID format"}
693698
end;
694-
true ->
695-
%% skip the test in mixed version mode
696-
{skip, "Should not run in mixed version environments"}
699+
false ->
700+
{skip, "Should only run in mixed version environments"}
697701
end.
698702

699703
%%

0 commit comments

Comments
 (0)