summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-06-26 16:28:23 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-06-26 16:28:23 +0100
commit6674ff263ca254b847d85e738f9f82fb8a6c20b7 (patch)
treec92654110e782c451afb44e5421a4c32c40167dd /src
parent03ac4d0eb20ab6cf4db01c5a518a37f42ced6ae4 (diff)
downloadrabbitmq-server-git-6674ff263ca254b847d85e738f9f82fb8a6c20b7.tar.gz
Add test
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_tests.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index f5492cdc68..624d41fb48 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -2136,6 +2136,7 @@ test_variable_queue() ->
fun test_variable_queue_all_the_bits_not_covered_elsewhere1/1,
fun test_variable_queue_all_the_bits_not_covered_elsewhere2/1,
fun test_dropwhile/1,
+ fun test_dropwhile_varying_ram_duration/1,
fun test_variable_queue_ack_limiting/1]],
passed.
@@ -2199,6 +2200,21 @@ test_dropwhile(VQ0) ->
VQ4.
+test_dropwhile_varying_ram_duration(VQ0) ->
+ VQ1 = rabbit_variable_queue:publish(
+ rabbit_basic:message(
+ rabbit_misc:r(<<>>, exchange, <<>>),
+ <<>>, #'P_basic'{}, <<>>),
+ #message_properties{}, self(), VQ0),
+ VQ2 = rabbit_variable_queue:set_ram_duration_target(0, VQ1),
+ VQ3 = rabbit_variable_queue:set_ram_duration_target(infinity, VQ2),
+ VQ4 = rabbit_variable_queue:publish(
+ rabbit_basic:message(
+ rabbit_misc:r(<<>>, exchange, <<>>),
+ <<>>, #'P_basic'{}, <<>>),
+ #message_properties{}, self(), VQ3),
+ rabbit_variable_queue:dropwhile(fun(_) -> false end, VQ4).
+
test_variable_queue_dynamic_duration_change(VQ0) ->
SegmentSize = rabbit_queue_index:next_segment_boundary(0),