test: ensure clean start for emqx_mod_sup_SUITE

This commit is contained in:
Zaiming (Stone) Shi 2022-11-02 14:49:16 +01:00
parent 6d943181d7
commit 25863b6773
1 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,18 @@
all() -> emqx_ct:all(?MODULE). all() -> emqx_ct:all(?MODULE).
init_per_suite(Config) ->
%% do not start the application
%% only testing the root supervisor in this suite
application:stop(emqx_modules),
{ok, Pid} = emqx_mod_sup:start_link(),
unlink(Pid),
Config.
end_per_suite(_Config) ->
exit(whereis(emqx_mod_sup), kill),
ok.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Test cases %% Test cases
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------