summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2019-12-13 14:09:57 +0100
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2019-12-13 14:09:57 +0100
commit58d0e5e81d05698f3778436cb732a352093c6a7b (patch)
treeca9b2ec995a85f34dbc7876edd80f962781313db
parent3605ce32b38ef7bce038580ed9408a224e023c8c (diff)
downloadrabbitmq-server-git-58d0e5e81d05698f3778436cb732a352093c6a7b.tar.gz
clustering_management_SUITE: Adapt behavior to pre-prelaunch nodes
When testing mixed-versions clusters, we need to check what kind of node is node B, because we may have to restart it differently.
-rw-r--r--test/clustering_management_SUITE.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/clustering_management_SUITE.erl b/test/clustering_management_SUITE.erl
index 7335767398..b9cf0629b6 100644
--- a/test/clustering_management_SUITE.erl
+++ b/test/clustering_management_SUITE.erl
@@ -191,6 +191,11 @@ join_and_part_cluster(Config) ->
join_cluster_bad_operations(Config) ->
[Rabbit, Hare, Bunny] = cluster_members(Config),
+ UsePrelaunch = rabbit_ct_broker_helpers:rpc(
+ Config, Hare,
+ erlang, function_exported,
+ [rabbit_prelaunch, get_context, 0]),
+
%% Nonexistent node
ok = stop_app(Rabbit),
assert_failure(fun () -> join_cluster(Rabbit, non@existent) end),
@@ -224,7 +229,13 @@ join_cluster_bad_operations(Config) ->
ok = stop_app(Hare),
assert_failure(fun () -> start_app(Hare) end),
ok = start_app(Rabbit),
- ok = start_app(Hare),
+ case UsePrelaunch of
+ true ->
+ ok = start_app(Hare);
+ false ->
+ %% The Erlang VM has stopped after previous rabbit app failure
+ ok = rabbit_ct_broker_helpers:start_node(Config, Hare)
+ end,
ok.
%% This tests that the nodes in the cluster are notified immediately of a node