From 8c3dd827a3c8f33b2b7a5605c0755c1f8d84bc2b Mon Sep 17 00:00:00 2001 From: Joe DeVivo Date: Wed, 1 May 2013 07:09:04 -0700 Subject: [PATCH] JMX test now checks for JMX failure taking down the whole node --- tests/jmx_verify.erl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/jmx_verify.erl b/tests/jmx_verify.erl index a3274396..ec15ca3a 100644 --- a/tests/jmx_verify.erl +++ b/tests/jmx_verify.erl @@ -26,6 +26,9 @@ %% You should have curl installed locally to do this. confirm() -> + + test_supervision(), + JMXPort = 41111, Config = [{riak_jmx, [{enabled, true}, {port, JMXPort}]}], Nodes = rt:deploy_nodes(1, Config), @@ -101,6 +104,19 @@ confirm() -> {<<"read_repairs">>, 1}]), pass. +test_supervision() -> + JMXPort = 80, + Config = [{riak_jmx, [{enabled, true}, {port, JMXPort}]}], + [Node|[]] = rt:deploy_nodes(1, Config), + timer:sleep(20000), + case net_adm:ping(Node) of + pang -> + lager:error("riak_jmx crash able to crash riak node"), + ?assertEqual("riak_jmx crash able to crash riak node", true); + _ -> + rt:stop(Node) + end. + verify_inc(Prev, Props, Keys) -> [begin Old = proplists:get_value(Key, Prev, 0),