test(impossible_case): remove impossible case test
Since `emqx_vm:get_process_info/1` only accepts PIDs as arguments, it's impossible for `emqx_sys_mon:procinfo/1` to return after receiving the atom `undefined`.
This commit is contained in:
parent
75a17431d5
commit
a41d0d49bd
|
@ -193,9 +193,6 @@ procinfo(Pid) ->
|
|||
procinfo_l(undefined) -> [];
|
||||
procinfo_l(List) -> List.
|
||||
|
||||
%% FIXME: impossible case in practice; it's always a PID
|
||||
get_proc_lib_initial_call(undefined) ->
|
||||
[];
|
||||
get_proc_lib_initial_call(Pid) ->
|
||||
case proc_lib:initial_call(Pid) of
|
||||
false ->
|
||||
|
|
|
@ -88,11 +88,6 @@ end_per_testcase(_, _Config) ->
|
|||
emqx_common_test_helpers:stop_apps([]).
|
||||
|
||||
t_procinfo(_) ->
|
||||
ok = meck:expect(emqx_vm, get_process_info, fun(_) -> [] end),
|
||||
ok = meck:expect(emqx_vm, get_process_gc_info, fun(_) -> [] end),
|
||||
%% FIXME: `procinfo' will actually crash if `undefined' is passed
|
||||
%% to it
|
||||
?assertEqual([{pid, undefined}], emqx_sys_mon:procinfo(undefined)),
|
||||
ok = meck:expect(emqx_vm, get_process_info, fun(_) -> [] end),
|
||||
ok = meck:expect(emqx_vm, get_process_gc_info, fun(_) -> undefined end),
|
||||
?assertEqual([{pid, self()}], emqx_sys_mon:procinfo(self())).
|
||||
|
|
Loading…
Reference in New Issue