summaryrefslogtreecommitdiff
path: root/src/rabbit_vhost.erl
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2018-12-05 17:47:56 +0300
committerMichael Klishin <michael@clojurewerkz.org>2018-12-05 17:47:56 +0300
commitf10083b4897fa4322fe85088199819c735e2516d (patch)
tree821bab1da746b3ec6ddf390f059a489300167fcd /src/rabbit_vhost.erl
parent5615c70df754d1dfe3b9605d8eae01bcdc900f19 (diff)
downloadrabbitmq-server-git-f10083b4897fa4322fe85088199819c735e2516d.tar.gz
Minor improvements to test stability
Per discussion with @dcorbacho.
Diffstat (limited to 'src/rabbit_vhost.erl')
-rw-r--r--src/rabbit_vhost.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rabbit_vhost.erl b/src/rabbit_vhost.erl
index c460b02e5b..e462fc6bc0 100644
--- a/src/rabbit_vhost.erl
+++ b/src/rabbit_vhost.erl
@@ -208,7 +208,16 @@ delete_storage(VHost) ->
VhostDir = msg_store_dir_path(VHost),
rabbit_log:info("Deleting message store directory for vhost '~s' at '~s'~n", [VHost, VhostDir]),
%% Message store should be closed when vhost supervisor is closed.
- ok = rabbit_file:recursive_delete([VhostDir]).
+ case rabbit_file:recursive_delete([VhostDir]) of
+ ok -> ok;
+ {error, {_, enoent}} ->
+ %% a concurrent delete did the job for us
+ rabbit_log:warning("Tried to delete storage directories for vhost '~s', it failed with an ENOENT", [VHost]),
+ ok;
+ Other ->
+ rabbit_log:warning("Tried to delete storage directories for vhost '~s': ~p", [VHost, Other]),
+ Other
+ end.
assert_benign(ok, _) -> ok;
assert_benign({ok, _}, _) -> ok;