From a0fb8b82ca817f528a0d0ce87cbcb5eec8ea41ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Thu, 21 Jul 2016 14:54:40 +0200 Subject: dynamic_ha_SUITE: Use an assertion to possibly fail the test ... instead of raising an exit signal. While here, use ct:pal/3 as the output function for PropEr, not io:format/3. This ensures common_test knows the origin of the message and that it's expected. [#126767013] --- test/dynamic_ha_SUITE.erl | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/dynamic_ha_SUITE.erl b/test/dynamic_ha_SUITE.erl index c54e4c2994..423a87bc92 100644 --- a/test/dynamic_ha_SUITE.erl +++ b/test/dynamic_ha_SUITE.erl @@ -335,16 +335,10 @@ get_stacktrace() -> %%---------------------------------------------------------------------------- run_proper(Fun, Args) -> - case proper:counterexample(erlang:apply(Fun, Args), - [{numtests, 25}, - {on_output, fun(F, A) -> - io:format(user, F, A) - end}]) of - true -> - true; - Value -> - exit(Value) - end. + ?assertEqual(true, + proper:counterexample(erlang:apply(Fun, Args), + [{numtests, 25}, + {on_output, fun(F, A) -> ct:pal(?LOW_IMPORTANCE, F, A) end}])). prop_random_policy(Config) -> [NodeA, _, _] = Nodes = rabbit_ct_broker_helpers:get_node_configs( -- cgit v1.2.1