summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2011-09-28 11:36:19 +0100
committerEmile Joubert <emile@rabbitmq.com>2011-09-28 11:36:19 +0100
commitf983269d622aa44d0d8994ed05b4fcf2582b2c03 (patch)
tree509cbfc7b2499dc7fc0556a8f398e964ff28ee9c /src
parent1e71f208683e5d505c4c0810751545c95391c20e (diff)
downloadrabbitmq-server-git-f983269d622aa44d0d8994ed05b4fcf2582b2c03.tar.gz
Better test coverage
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_tests.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index da47503747..98d0804139 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -2328,14 +2328,16 @@ test_variable_queue_requeue(VQ0) ->
{VQM, [{AckTag, N} | AckTags]}
end, {VQ2, []}, lists:seq(0, Count - 1)),
SubMap = lists:filter(fun ({_AckTag, N}) ->
- N rem 500 =:= 0
+ N rem 50 =:= 0
end, AckMap),
{_MsgIds, VQ4} =
rabbit_variable_queue:requeue(proplists:get_keys(AckMap -- SubMap),
fun(X) -> X end, VQ3),
- {_MsgIds2, VQ5} =
- rabbit_variable_queue:requeue(proplists:get_keys(SubMap),
- fun(X) -> X end, VQ4),
+ VQ5 = lists:foldl(fun (AckTag, VQN) ->
+ {_MsgId, VQM} = rabbit_variable_queue:requeue(
+ [AckTag], fun(X) -> X end, VQN),
+ VQM
+ end, VQ4, proplists:get_keys(SubMap)),
VQ6 = lists:foldl(fun ({N, _}, VQN) ->
{{#basic_message{}, true, AckTag, QLen}, VQM} =
rabbit_variable_queue:fetch(true, VQN),