summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-07-15 16:40:36 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-07-15 16:40:36 +0100
commit474c6763d5a5fea241642c2e27bcaeceda4cab68 (patch)
tree9988bf0bdbba86b1a0110fdd706b6c1c41b63dac /src
parent3ceca58444a08af7a5db89896aa177b48573d85d (diff)
downloadrabbitmq-server-474c6763d5a5fea241642c2e27bcaeceda4cab68.tar.gz
cleanup queue and restart app
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_tests.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 63676fef..2542905f 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -60,6 +60,9 @@ all_tests() ->
passed = test_confirms(),
passed = maybe_run_cluster_dependent_tests(),
passed = test_configurable_server_properties(),
+ ok = cleanup_test_queue(),
+ ok = restart_app(),
+ io:format("rabbit app restarted"),
passed.
maybe_run_cluster_dependent_tests() ->
@@ -1911,6 +1914,16 @@ with_empty_test_queue(Fun) ->
{0, Qi} = init_test_queue(),
rabbit_queue_index:delete_and_terminate(Fun(Qi)).
+cleanup_test_queue() ->
+ %% the test queue's already there; let's remove it
+ {_, Q} = rabbit_amqqueue:declare(test_queue(), true, false, [], none),
+ {ok, _} = rabbit_amqqueue:delete(Q, false, false),
+ ok.
+
+restart_app() ->
+ rabbit:stop(),
+ rabbit:start().
+
queue_index_publish(SeqIds, Persistent, Qi) ->
Ref = rabbit_guid:guid(),
MsgStore = case Persistent of