From 9ee856546a2020e42c026a0ac2f93cca049235e3 Mon Sep 17 00:00:00 2001 From: Jason Voegele Date: Tue, 25 Aug 2015 14:39:28 -0400 Subject: [PATCH] Fail with the bare atom fail `riak_test_runner` does not support tagged tuples for failures. Fix verify_snmp_repl module so that it returns the bare atom `fail` when it fails, and write more detailed error messages to the log instead. --- tests/verify_snmp_repl.erl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/verify_snmp_repl.erl b/tests/verify_snmp_repl.erl index 71307fd3..1d6c7b1a 100644 --- a/tests/verify_snmp_repl.erl +++ b/tests/verify_snmp_repl.erl @@ -64,11 +64,18 @@ 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]), + fail; + X -> + lager:error("Unknown failure in wait_for_snmp_stat_poller: ~p~n", [X]), + fail after - 1000 -> {fail, timeout} + 1000 -> + lager:error("Timeout failure in wait_for_snmp_stat_poller."), + fail end. make_nodes(NodeCount, ClusterCount, Config) ->