diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-14 13:35:05 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-14 13:35:05 +0000 |
commit | d3a12bdc757e87e3205d60e1bb4a58a94f3454ec (patch) | |
tree | 29f066067883c8963b7b32cca9d280714a2a87d3 | |
parent | bd61fc79a05b5d1facf4ccecfabdcbce04ed1b23 (diff) | |
download | rabbitmq-server-d3a12bdc757e87e3205d60e1bb4a58a94f3454ec.tar.gz |
improve assertion in vq:fold test
-rw-r--r-- | src/rabbit_tests.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 45d5a09e..af8e2f9b 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -2336,8 +2336,12 @@ test_variable_queue_fold(VQ0) -> VQ4 = variable_queue_publish( true, JustOverTwoSegs + 1, 64, fun (_, P) -> P end, fun erlang:term_to_binary/1, VQ3), - [false = V == 0 || {K, V} <- rabbit_variable_queue:status(VQ4), - lists:member(K, [q1, delta, q3])], %% precondition + [false = case V of + {delta, _, 0, _} -> true; + 0 -> true; + _ -> false + end || {K, V} <- rabbit_variable_queue:status(VQ4), + lists:member(K, [q1, delta, q3])], %% precondition Count = JustOverTwoSegs + 64, lists:foldl( fun (Cut, VQ5) -> test_variable_queue_fold(Cut, Count, VQ5) end, |