test: cpu utilization value

This commit is contained in:
JimMoen 2024-03-07 18:12:26 +08:00
parent 0297c7b83b
commit bc9084db79
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,8 @@
-include_lib("eunit/include/eunit.hrl"). -include_lib("eunit/include/eunit.hrl").
all() -> emqx_common_test_helpers:all(?MODULE). all() ->
emqx_common_test_helpers:all(?MODULE).
t_load(_Config) -> t_load(_Config) ->
lists:foreach( lists:foreach(
@ -97,7 +98,7 @@ t_get_process_limit(_Config) ->
emqx_vm:get_process_limit(). emqx_vm:get_process_limit().
t_cpu_util(_Config) -> t_cpu_util(_Config) ->
_Cpu = emqx_vm:cpu_util(). ?assertMatch(Val when is_number(Val), emqx_vm:cpu_util()).
easy_server() -> easy_server() ->
{ok, LSock} = gen_tcp:listen(5678, [binary, {packet, 0}, {active, false}]), {ok, LSock} = gen_tcp:listen(5678, [binary, {packet, 0}, {active, false}]),