Merge pull request #852 from basho/bugfix/verify-snmp-repl-fail-appropriately

Fail by crashing test process instead of returning a tagged tuple
This commit is contained in:
Jason Voegele 2015-08-26 09:48:32 -04:00
commit b8dfb15d14

View File

@ -57,6 +57,7 @@ intercept_riak_snmp_stat_poller(Node) ->
RiakTestProcess ! pass
catch
Exception:Reason ->
lager:error("Failure in riak_snmp_stat_poller_orig:set_rows_orig: ~p~n", [{Exception, Reason}]),
RiakTestProcess ! {fail, {Exception, Reason}},
error({Exception, Reason})
end
@ -64,11 +65,19 @@ intercept_riak_snmp_stat_poller(Node) ->
wait_for_snmp_stat_poller() ->
receive
pass -> pass;
{fail, Reason} -> {fail, Reason};
X -> {fail, {unknown, X}}
pass ->
pass;
{fail, Reason} ->
lager:error("Failure in wait_for_snmp_stat_poller: ~p~n", [Reason]),
error({fail, Reason});
X ->
lager:error("Unknown failure in wait_for_snmp_stat_poller: ~p~n", [X]),
error(X)
after
1000 -> {fail, timeout}
1000 ->
Message = "Timeout waiting for snmp_stat_poller.",
lager:error(Message),
error({timeout, Message})
end.
make_nodes(NodeCount, ClusterCount, Config) ->