summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Fedotov <daniil@rabbitmq.com>2017-03-30 14:40:13 +0100
committerGerhard Lazu <gerhard@rabbitmq.com>2017-03-30 14:40:13 +0100
commitf9f5b6a7a04bfe9dedaebdcfd2acf474055d641d (patch)
tree667edf91548ffbff8bb10970eec9ccdb96138c7b
parent8b916e764013295370a4509fc84cb4c5b12dea1d (diff)
downloadrabbitmq-server-git-f9f5b6a7a04bfe9dedaebdcfd2acf474055d641d.tar.gz
Add shutdown test for non-running node
Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com> [finishes #142699247]
-rw-r--r--test/rabbitmqctl_shutdown_SUITE.erl22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/rabbitmqctl_shutdown_SUITE.erl b/test/rabbitmqctl_shutdown_SUITE.erl
index d859521a22..f8fd22f746 100644
--- a/test/rabbitmqctl_shutdown_SUITE.erl
+++ b/test/rabbitmqctl_shutdown_SUITE.erl
@@ -22,7 +22,8 @@
all() ->
[
- {group, running_node}
+ {group, running_node},
+ {group, non_running_node}
].
groups() ->
@@ -30,6 +31,9 @@ groups() ->
{running_node, [], [
successful_shutdown,
error_during_shutdown
+ ]},
+ {non_running_node, [], [
+ nothing_to_shutdown
]}
].
@@ -92,10 +96,18 @@ error_during_shutdown(Config) ->
ok = rabbit_control_main:action(stop_app, Node, [], [], fun ct:pal/2),
ok = rpc:call(Node, application, unload, [os_mon]),
- {
- badrpc, {'EXIT',
- {{error, {badmatch, {error,{edge,{bad_vertex,os_mon},os_mon,rabbit}}}}, _}}
- } = rabbit_control_main:action(shutdown, Node, [], [], fun ct:pal/2).
+ {badrpc,
+ {'EXIT', {
+ {error, {badmatch, {error,{edge,{bad_vertex,os_mon},os_mon,rabbit}}}},
+ _}}} =
+ rabbit_control_main:action(shutdown, Node, [], [], fun ct:pal/2).
+
+
+nothing_to_shutdown(Config) ->
+ Node = ?config(node, Config),
+
+ { badrpc, nodedown } =
+ rabbit_control_main:action(shutdown, Node, [], [], fun ct:pal/2).
node_pid(Node) ->
Val = rpc:call(Node, os, getpid, []),