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 | |
| parent | 5615c70df754d1dfe3b9605d8eae01bcdc900f19 (diff) | |
| download | rabbitmq-server-git-f10083b4897fa4322fe85088199819c735e2516d.tar.gz | |
Minor improvements to test stability
Per discussion with @dcorbacho.
| -rw-r--r-- | src/rabbit_vhost.erl | 11 | ||||
| -rw-r--r-- | test/quorum_queue_SUITE.erl | 4 |
2 files changed, 13 insertions, 2 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; diff --git a/test/quorum_queue_SUITE.erl b/test/quorum_queue_SUITE.erl index bef943da0c..4190903409 100644 --- a/test/quorum_queue_SUITE.erl +++ b/test/quorum_queue_SUITE.erl @@ -2021,7 +2021,9 @@ consume_redelivery_count(Config) -> amqp_channel:cast(Ch, #'basic.nack'{delivery_tag = DeliveryTag, multiple = false, requeue = true}), - + %% wait for requeueing + timer:sleep(500), + {#'basic.get_ok'{delivery_tag = DeliveryTag1, redelivered = true}, #amqp_msg{props = #'P_basic'{headers = H1}}} = |
