Преглед изворни кода

fix(test): ensure emqx_metrics stopped before testing

Shawn пре 3 година
родитељ
комит
6c9e0d62e2
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      apps/emqx/test/emqx_metrics_SUITE.erl

+ 1 - 0
apps/emqx/test/emqx_metrics_SUITE.erl

@@ -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().