diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-07-21 14:54:40 +0200 |
|---|---|---|
| committer | Diana Corbacho <diana@rabbitmq.com> | 2016-08-31 10:46:28 +0100 |
| commit | a53b2405b4a7c0e6a7a64cceed71fbd63064a5cc (patch) | |
| tree | d38bb9db0d5c3f3b90a0de953f8168a6ad43ac16 | |
| parent | b8a0379d226d88155e73b065d15f1fac14296cc7 (diff) | |
| download | rabbitmq-server-git-a53b2405b4a7c0e6a7a64cceed71fbd63064a5cc.tar.gz | |
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]
| -rw-r--r-- | test/dynamic_ha_SUITE.erl | 14 |
1 files 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( |
