Skip to content

Commit

Permalink
rabbit_db_vhost: Bubble up database errors in clear/0
Browse files Browse the repository at this point in the history
This function is only used by a test suite which matches on the 'ok'
return.
  • Loading branch information
the-mikedavis committed May 8, 2024
1 parent 17f9097 commit cfad5d7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions deps/rabbit/src/rabbit_db_vhost.erl
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ delete_in_khepri(VHostName) ->
%% clear().
%% -------------------------------------------------------------------

-spec clear() -> ok.
-spec clear() -> ok | rabbit_khepri:timeout_error().
%% @doc Deletes all vhosts.
%%
%% @private
Expand All @@ -473,10 +473,7 @@ clear_in_mnesia() ->

clear_in_khepri() ->
Path = khepri_vhosts_path(),
case rabbit_khepri:delete(Path) of
ok -> ok;
Error -> throw(Error)
end.
rabbit_khepri:delete(Path).

%% --------------------------------------------------------------
%% Paths
Expand Down

0 comments on commit cfad5d7

Please sign in to comment.