diff options
author | Michael Klishin <michael@clojurewerkz.org> | 2018-12-05 17:47:56 +0300 |
---|---|---|
committer | Michael Klishin <michael@clojurewerkz.org> | 2018-12-05 17:47:56 +0300 |
commit | f10083b4897fa4322fe85088199819c735e2516d (patch) | |
tree | 821bab1da746b3ec6ddf390f059a489300167fcd /src/rabbit_vhost.erl | |
parent | 5615c70df754d1dfe3b9605d8eae01bcdc900f19 (diff) | |
download | rabbitmq-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.erl | 11 |
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; |