summaryrefslogtreecommitdiff
path: root/src/rabbit_tests.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-05-01 12:26:18 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-05-01 12:26:18 +0100
commitcafaa1943a0e20b010449a1908c459f76b848107 (patch)
tree01ec7325dfe9ec72c5f55e7cd3bc3e8c88ee82fd /src/rabbit_tests.erl
parent014d5695aa658fcb68592bbc41544808db34caf0 (diff)
parent170102611c47f8bafd7ebfd5a29a76803011e33c (diff)
downloadrabbitmq-server-cafaa1943a0e20b010449a1908c459f76b848107.tar.gz
Merge bug 24196.
Diffstat (limited to 'src/rabbit_tests.erl')
-rw-r--r--src/rabbit_tests.erl16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 35bf1012..96b5fa38 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -2421,10 +2421,10 @@ test_dropwhile(VQ0) ->
fun (N, Props) -> Props#message_properties{expiry = N} end, VQ0),
%% drop the first 5 messages
- VQ2 = rabbit_variable_queue:dropwhile(
- fun(#message_properties { expiry = Expiry }) ->
- Expiry =< 5
- end, undefined, VQ1),
+ {undefined, VQ2} = rabbit_variable_queue:dropwhile(
+ fun(#message_properties { expiry = Expiry }) ->
+ Expiry =< 5
+ end, false, VQ1),
%% fetch five now
VQ3 = lists:foldl(fun (_N, VQN) ->
@@ -2441,11 +2441,13 @@ test_dropwhile(VQ0) ->
test_dropwhile_varying_ram_duration(VQ0) ->
VQ1 = variable_queue_publish(false, 1, VQ0),
VQ2 = rabbit_variable_queue:set_ram_duration_target(0, VQ1),
- VQ3 = rabbit_variable_queue:dropwhile(
- fun(_) -> false end, undefined, VQ2),
+ {undefined, VQ3} = rabbit_variable_queue:dropwhile(
+ fun(_) -> false end, false, VQ2),
VQ4 = rabbit_variable_queue:set_ram_duration_target(infinity, VQ3),
VQ5 = variable_queue_publish(false, 1, VQ4),
- rabbit_variable_queue:dropwhile(fun(_) -> false end, undefined, VQ5).
+ {undefined, VQ6} =
+ rabbit_variable_queue:dropwhile(fun(_) -> false end, false, VQ5),
+ VQ6.
test_variable_queue_dynamic_duration_change(VQ0) ->
SegmentSize = rabbit_queue_index:next_segment_boundary(0),