JMX test now checks for JMX failure taking down the whole node

This commit is contained in:
Joe DeVivo 2013-05-01 07:09:04 -07:00
parent d842574cad
commit 8c3dd827a3

View File

@ -26,6 +26,9 @@
%% You should have curl installed locally to do this. %% You should have curl installed locally to do this.
confirm() -> confirm() ->
test_supervision(),
JMXPort = 41111, JMXPort = 41111,
Config = [{riak_jmx, [{enabled, true}, {port, JMXPort}]}], Config = [{riak_jmx, [{enabled, true}, {port, JMXPort}]}],
Nodes = rt:deploy_nodes(1, Config), Nodes = rt:deploy_nodes(1, Config),
@ -101,6 +104,19 @@ confirm() ->
{<<"read_repairs">>, 1}]), {<<"read_repairs">>, 1}]),
pass. 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) -> verify_inc(Prev, Props, Keys) ->
[begin [begin
Old = proplists:get_value(Key, Prev, 0), Old = proplists:get_value(Key, Prev, 0),