From 25863b677354b36751dd646cc6c9de853860cc21 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Wed, 2 Nov 2022 14:49:16 +0100 Subject: [PATCH] test: ensure clean start for emqx_mod_sup_SUITE --- lib-ce/emqx_modules/test/emqx_mod_sup_SUITE.erl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib-ce/emqx_modules/test/emqx_mod_sup_SUITE.erl b/lib-ce/emqx_modules/test/emqx_mod_sup_SUITE.erl index 055ccd2cb..e75d2379c 100644 --- a/lib-ce/emqx_modules/test/emqx_mod_sup_SUITE.erl +++ b/lib-ce/emqx_modules/test/emqx_mod_sup_SUITE.erl @@ -23,6 +23,18 @@ 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 %%--------------------------------------------------------------------