Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ delete() ->
}).

delete_in_mnesia() ->
mnesia:delete_table(?RH_TABLE).
case mnesia:delete_table(?RH_TABLE) of
{atomic, ok} ->
ok;
{aborted, Reason} ->
{error, Reason}
end.

delete_in_khepri() ->
rabbit_khepri:delete(khepri_recent_history_path()).
Expand Down
13 changes: 12 additions & 1 deletion deps/rabbitmq_recent_history_exchange/test/system_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ all_tests() ->
wrong_argument_type_test,
no_store_test,
e2e_test,
multinode_test
multinode_test,
lifecycle_test
].

%% -------------------------------------------------------------------
Expand Down Expand Up @@ -235,6 +236,16 @@ multinode_test(Config) ->
rabbit_ct_client_helpers:close_connection_and_channel(Conn2, Chan2),
ok.

lifecycle_test(Config) ->
%% Ensure that the boot and cleanup steps run as expected and return 'ok'.
ok = rabbit_ct_broker_helpers:rpc(
Config,
rabbit, stop_apps, [[rabbitmq_recent_history_exchange]]),
ok = rabbit_ct_broker_helpers:rpc(
Config,
rabbit, start_apps, [[rabbitmq_recent_history_exchange]]),
ok.

test0(Config, MakeMethod, MakeMsg, DeclareArgs, Queues, MsgCount, ExpectedCount) ->
Chan = rabbit_ct_client_helpers:open_channel(Config),
#'exchange.declare_ok'{} =
Expand Down