Skip to content

Commit 79fa87f

Browse files
author
Daniil Fedotov
committed
Shutdown cannot fail
1 parent e0336d9 commit 79fa87f

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

test/rabbitmqctl_shutdown_SUITE.erl

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ all() ->
2929
groups() ->
3030
[
3131
{running_node, [], [
32-
successful_shutdown,
33-
error_during_shutdown
32+
successful_shutdown
3433
]},
3534
{non_running_node, [], [
3635
nothing_to_shutdown
@@ -91,16 +90,6 @@ successful_shutdown(Config) ->
9190
false = erlang_pid_is_running(Pid),
9291
false = node_is_running(Node).
9392

94-
error_during_shutdown(Config) ->
95-
Node = ?config(node, Config),
96-
ok = rabbit_ct_broker_helpers:control_action(stop_app, Node, []),
97-
ok = rpc:call(Node, application, unload, [os_mon]),
98-
99-
{badrpc,
100-
{'EXIT', {
101-
{error, {badmatch, {error,{edge,{bad_vertex,os_mon},os_mon,rabbit}}}},
102-
_}}} = shutdown_error(Node).
103-
10493

10594
nothing_to_shutdown(Config) ->
10695
Node = ?config(node, Config),
@@ -119,14 +108,6 @@ erlang_pid_is_running(Pid) ->
119108
node_is_running(Node) ->
120109
net_adm:ping(Node) == pong.
121110

122-
shutdown_error(Node) ->
123-
%% Start a command
124-
{stream, Stream} = rabbit_ct_broker_helpers:control_action(shutdown, Node, []),
125-
%% Execute command steps. The last one should be error
126-
Lines = 'Elixir.Enum':to_list(Stream),
127-
{error, Err} = lists:last(Lines),
128-
Err.
129-
130111
shutdown_ok(Node) ->
131112
%% Start a command
132113
{stream, Stream} = rabbit_ct_broker_helpers:control_action(shutdown, Node, []),

0 commit comments

Comments
 (0)