summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-10-19 12:54:30 +0100
committerMatthew Sackman <matthew@lshift.net>2009-10-19 12:54:30 +0100
commit6cab4bfa645307da9fdb663d5ff24abfda69bae3 (patch)
treed847e7c5e510117f06c44016ecf16ce11c4fac4a
parentc2f658e49a585928ce93316258d39bc150a77fba (diff)
downloadrabbitmq-server-git-6cab4bfa645307da9fdb663d5ff24abfda69bae3.tar.gz
stop the msg_store at the end of the tests so the rest of the test suite can run. Also, fractionally increase code coverage.
-rw-r--r--src/rabbit_tests.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 607e7e7b4a..88aba9d3f1 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -876,6 +876,17 @@ test_msg_store() ->
throw(timeout)
end
end, MsgIds2ndHalf),
+ %% it's very likely we're totally sync'd here, so the 1st half
+ %% sync should not cause an fsync (hence different code path
+ ok = rabbit_msg_store:sync(MsgIds1stHalf,
+ fun () -> Self ! {sync, first_half} end),
+ receive
+ {sync, first_half} -> ok
+ after
+ 10000 ->
+ io:format("Sync from msg_store missing for first_half~n"),
+ throw(timeout)
+ end,
%% read them all
ok =
lists:foldl(
@@ -971,4 +982,5 @@ test_msg_store() ->
%% restart empty
ok = rabbit_msg_store:stop(),
{ok, _Pid3} = start_msg_store_empty(),
+ ok = rabbit_msg_store:stop(),
passed.