fix(test): ensure emqx_metrics stopped before testing

This commit is contained in:
Shawn 2022-04-28 18:13:54 +08:00
parent 4b7d9b7239
commit 6c9e0d62e2
1 changed files with 1 additions and 0 deletions

View File

@ -166,6 +166,7 @@ t_trans(_) ->
). ).
with_metrics_server(Fun) -> with_metrics_server(Fun) ->
_ = supervisor:terminate_child(emqx_kernel_sup, emqx_metrics),
{ok, _} = emqx_metrics:start_link(), {ok, _} = emqx_metrics:start_link(),
_ = Fun(), _ = Fun(),
ok = emqx_metrics:stop(). ok = emqx_metrics:stop().