test: fix flaky
This commit is contained in:
parent
c0552d8877
commit
0edeff4786
|
@ -78,7 +78,8 @@ handle_call({cpu_util, Args}, _From, State) ->
|
|||
Val = erlang:apply(cpu_sup, util, Args),
|
||||
{reply, Val, State};
|
||||
handle_call(Req, _From, State) ->
|
||||
{reply, {error, {unexpected_call, Req}}, State}.
|
||||
?SLOG(error, #{msg => "unexpected_call", call => Req}),
|
||||
{reply, ignored, State}.
|
||||
|
||||
handle_cast(Msg, State) ->
|
||||
?SLOG(error, #{msg => "unexpected_cast", cast => Msg}),
|
||||
|
|
|
@ -28,7 +28,7 @@ start_link() ->
|
|||
init([]) ->
|
||||
OsMon =
|
||||
case emqx_os_mon:is_os_check_supported() of
|
||||
true -> [child_spec(emqx_cpu_sup_worker), child_spec(emqx_os_mon)];
|
||||
true -> [child_spec(emqx_os_mon), child_spec(emqx_cpu_sup_worker)];
|
||||
false -> []
|
||||
end,
|
||||
Children =
|
||||
|
|
|
@ -132,7 +132,8 @@ do_sys_mem_check_alarm(_Config) ->
|
|||
get_memory_usage,
|
||||
fun() -> Mem end,
|
||||
fun() ->
|
||||
timer:sleep(500),
|
||||
%% wait for `os_mon` started
|
||||
timer:sleep(10_000),
|
||||
Alarms = emqx_alarm:get_alarms(activated),
|
||||
?assert(
|
||||
emqx_vm_mon_SUITE:is_existing(
|
||||
|
|
Loading…
Reference in New Issue