diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-06-26 16:28:23 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-06-26 16:28:23 +0100 |
commit | 78b92f44d5ce7b6715d48b27bf6b38749023eba3 (patch) | |
tree | c92654110e782c451afb44e5421a4c32c40167dd | |
parent | 1f91b16ad30f22175eeb8a77e4a6b5d33d888698 (diff) | |
download | rabbitmq-server-78b92f44d5ce7b6715d48b27bf6b38749023eba3.tar.gz |
Add test
-rw-r--r-- | src/rabbit_tests.erl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index f5492cdc..624d41fb 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), |