fix: prometheus ct failed

This commit is contained in:
Zhongwen Deng 2022-10-26 22:05:20 +08:00
parent 3233a40af3
commit d6dfead31d
1 changed files with 7 additions and 3 deletions

View File

@ -71,9 +71,13 @@ load_config() ->
%%--------------------------------------------------------------------
t_start_stop(_) ->
?assertMatch(ok, emqx_prometheus:start()),
?assertMatch(ok, emqx_prometheus:stop()),
?assertMatch(ok, emqx_prometheus:restart()),
App = emqx_prometheus,
?assertMatch(ok, emqx_prometheus_sup:start_child(App)),
%% start twice return ok.
?assertMatch(ok, emqx_prometheus_sup:start_child(App)),
?assertMatch(ok, emqx_prometheus_sup:stop_child(App)),
%% stop twice return ok.
?assertMatch(ok, emqx_prometheus_sup:stop_child(App)),
%% wait the interval timer trigger
timer:sleep(2000).