Skip to content

Commit 6d52987

Browse files
committed
Start/stop test node after VM stops because of rabbit app failures
rabbitmq-server-1216 [#145106709]
1 parent 53d71df commit 6d52987

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/clustering_management_SUITE.erl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ join_cluster_bad_operations(Config) ->
180180
ok = stop_app(Hare),
181181
assert_failure(fun () -> start_app(Hare) end),
182182
ok = start_app(Rabbit),
183-
ok = start_app(Hare),
183+
%% The Erlang VM has stopped after previous rabbit app failure
184+
ok = rabbit_ct_broker_helpers:start_node(Config, Hare),
184185
ok.
185186

186187
%% This tests that the nodes in the cluster are notified immediately of a node
@@ -532,25 +533,34 @@ erlang_config(Config) ->
532533
ok = reset(Hare),
533534
ok = rpc:call(Hare, application, set_env,
534535
[rabbit, cluster_nodes, {["Mike's computer"], disc}]),
536+
%% Rabbit app stops abnormally, node goes down
535537
assert_failure(fun () -> start_app(Hare) end),
536538
assert_not_clustered(Rabbit),
537539

538540
%% If we use an invalid node type, the node fails to start.
541+
%% The Erlang VM has stopped after previous rabbit app failure
542+
ok = rabbit_ct_broker_helpers:start_node(Config, Hare),
539543
ok = stop_app(Hare),
540544
ok = reset(Hare),
541545
ok = rpc:call(Hare, application, set_env,
542546
[rabbit, cluster_nodes, {[Rabbit], blue}]),
547+
%% Rabbit app stops abnormally, node goes down
543548
assert_failure(fun () -> start_app(Hare) end),
544549
assert_not_clustered(Rabbit),
545550

546551
%% If we use an invalid cluster_nodes conf, the node fails to start.
552+
%% The Erlang VM has stopped after previous rabbit app failure
553+
ok = rabbit_ct_broker_helpers:start_node(Config, Hare),
547554
ok = stop_app(Hare),
548555
ok = reset(Hare),
549556
ok = rpc:call(Hare, application, set_env,
550557
[rabbit, cluster_nodes, true]),
558+
%% Rabbit app stops abnormally, node goes down
551559
assert_failure(fun () -> start_app(Hare) end),
552560
assert_not_clustered(Rabbit),
553561

562+
%% The Erlang VM has stopped after previous rabbit app failure
563+
ok = rabbit_ct_broker_helpers:start_node(Config, Hare),
554564
ok = stop_app(Hare),
555565
ok = reset(Hare),
556566
ok = rpc:call(Hare, application, set_env,

0 commit comments

Comments
 (0)