summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-12-05 16:36:33 +0000
committerSimon MacMullen <simon@rabbitmq.com>2014-12-05 16:36:33 +0000
commitf15d681b9bad1d42eccd67804a0add2c6bf1e0d2 (patch)
tree1094f94c0bce37446bfcac02a6dbc3d79fb9b3ea /test
parent1215f25e584f05bec9560c2236a10e3b6be62d2e (diff)
downloadrabbitmq-server-git-f15d681b9bad1d42eccd67804a0add2c6bf1e0d2.tar.gz
Clearer test failures.
Diffstat (limited to 'test')
-rw-r--r--test/src/rabbit_tests.erl19
1 files changed, 14 insertions, 5 deletions
diff --git a/test/src/rabbit_tests.erl b/test/src/rabbit_tests.erl
index c88b930b98..e7da3acb8b 100644
--- a/test/src/rabbit_tests.erl
+++ b/test/src/rabbit_tests.erl
@@ -2466,7 +2466,10 @@ variable_queue_set_ram_duration_target(Duration, VQ) ->
rabbit_variable_queue:set_ram_duration_target(Duration, VQ)).
assert_prop(List, Prop, Value) ->
- Value = proplists:get_value(Prop, List).
+ case proplists:get_value(Prop, List)of
+ Value -> ok;
+ _ -> {exit, Prop, exp, Value, List}
+ end.
assert_props(List, PropVals) ->
[assert_prop(List, Prop, Value) || {Prop, Value} <- PropVals].
@@ -2489,12 +2492,18 @@ with_fresh_variable_queue(Fun) ->
{delta, undefined, 0, undefined}},
{q3, 0}, {q4, 0},
{len, 0}]),
- _ = rabbit_variable_queue:delete_and_terminate(
- shutdown, Fun(VQ)),
- Me ! Ref
+ try
+ _ = rabbit_variable_queue:delete_and_terminate(
+ shutdown, Fun(VQ)),
+ Me ! Ref
+ catch
+ Type:Error ->
+ Me ! {Ref, Type, Error, erlang:get_stacktrace()}
+ end
end),
receive
- Ref -> ok
+ Ref -> ok;
+ {Ref, Type, Error, ST} -> exit({Type, Error, ST})
end,
passed.