fix: dialyzer warning
This commit is contained in:
parent
c26a18e949
commit
dd687d9582
|
@ -298,11 +298,7 @@ remove(Type, Name) ->
|
||||||
%% just for perform_bridge_changes/1
|
%% just for perform_bridge_changes/1
|
||||||
remove(Type, Name, _Conf, _Opts) ->
|
remove(Type, Name, _Conf, _Opts) ->
|
||||||
?SLOG(info, #{msg => "remove_bridge", type => Type, name => Name}),
|
?SLOG(info, #{msg => "remove_bridge", type => Type, name => Name}),
|
||||||
case emqx_resource:remove_local(resource_id(Type, Name)) of
|
emqx_resource:remove_local(resource_id(Type, Name)).
|
||||||
ok -> ok;
|
|
||||||
{error, not_found} -> ok;
|
|
||||||
{error, Reason} -> {error, Reason}
|
|
||||||
end.
|
|
||||||
|
|
||||||
%% convert bridge configs to what the connector modules want
|
%% convert bridge configs to what the connector modules want
|
||||||
parse_confs(
|
parse_confs(
|
||||||
|
|
|
@ -266,7 +266,7 @@ remove_local(ResId) ->
|
||||||
{error, not_found} ->
|
{error, not_found} ->
|
||||||
ok;
|
ok;
|
||||||
Error ->
|
Error ->
|
||||||
%% Only log, the ResId worker is always remove in manager's remove action.
|
%% Only log, the ResId worker is always removed in manager's remove action.
|
||||||
?SLOG(warning, #{
|
?SLOG(warning, #{
|
||||||
msg => "remove_local_resource_failed",
|
msg => "remove_local_resource_failed",
|
||||||
error => Error,
|
error => Error,
|
||||||
|
|
|
@ -110,7 +110,7 @@ t_create_remove(_) ->
|
||||||
?assert(is_process_alive(Pid)),
|
?assert(is_process_alive(Pid)),
|
||||||
|
|
||||||
?assertEqual(ok, emqx_resource:remove(?ID)),
|
?assertEqual(ok, emqx_resource:remove(?ID)),
|
||||||
?assertMatch({error, _}, emqx_resource:remove(?ID)),
|
?assertMatch(ok, emqx_resource:remove(?ID)),
|
||||||
|
|
||||||
?assertNot(is_process_alive(Pid))
|
?assertNot(is_process_alive(Pid))
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue