summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-06-22 15:31:11 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-06-22 15:31:11 +0100
commitf92f8c0a212bdce8377b05fdd26206f1b7156516 (patch)
tree2d8ff1051a7e81ac783f42a799b03174326d9c29
parentfafcc3051120e22f610726b1ea0739be18681c78 (diff)
downloadrabbitmq-server-git-f92f8c0a212bdce8377b05fdd26206f1b7156516.tar.gz
Further code coverage improvements. Up to 96.52% on VQ
-rw-r--r--src/rabbit_tests.erl18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 13aeb85188..27ff51de3b 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -1874,14 +1874,22 @@ test_queue_recover() ->
rabbit_amqqueue:with_or_die(
QName,
fun (Q1 = #amqqueue { pid = QPid1 }) ->
- CountMinusOne = Count - 1,
- {ok, CountMinusOne, {QName, QPid1, _AckTag, true, _Msg}} =
+ Count1 = Count - 1,
+ {ok, Count1, {QName, QPid1, _AckTag, true, _Msg}} =
rabbit_amqqueue:basic_get(Q1, self(), false),
exit(QPid1, shutdown),
VQ1 = rabbit_variable_queue:init(QName, true, true),
- {{_Msg1, true, _AckTag1, CountMinusOne}, VQ2} =
- rabbit_variable_queue:fetch(true, VQ1),
- _VQ3 = rabbit_variable_queue:delete_and_terminate(VQ2),
+ VQ2 = variable_queue_publish(false, Count, VQ1),
+ VQ3 = rabbit_variable_queue:set_ram_duration_target(0, VQ2),
+ {VQ4, _AckTags} = variable_queue_fetch(Count, true, true, Count + Count, VQ3),
+ {VQ5, _AckTags1} = variable_queue_fetch(Count, false, false, Count, VQ4),
+ _VQ6 = rabbit_variable_queue:terminate(VQ5),
+ VQ7 = rabbit_variable_queue:init(QName, true, true),
+ {{_Msg1, true, _AckTag1, Count1}, VQ8} =
+ rabbit_variable_queue:fetch(true, VQ7),
+ VQ9 = variable_queue_publish(false, 1, VQ8),
+ VQ10 = rabbit_variable_queue:set_ram_duration_target(0, VQ9),
+ _VQ11 = rabbit_variable_queue:delete_and_terminate(VQ10),
rabbit_amqqueue:internal_delete(QName)
end),
passed.