fix(emqx_resource_instance): fix dialyzer warning

This commit is contained in:
EMQ-YangM 2022-02-28 18:18:57 +08:00
parent db97ed5163
commit db0e9e3358
2 changed files with 3 additions and 1 deletions

View File

@ -182,7 +182,7 @@ wait_for_resource_ready(InstId, 0) ->
force_lookup(InstId); force_lookup(InstId);
wait_for_resource_ready(InstId, Retry) -> wait_for_resource_ready(InstId, Retry) ->
case force_lookup(InstId) of case force_lookup(InstId) of
#{resource_data := #{status := connected}} = Data -> Data; #{status := connected} = Data -> Data;
_ -> _ ->
timer:sleep(100), timer:sleep(100),
wait_for_resource_ready(InstId, Retry-1) wait_for_resource_ready(InstId, Retry-1)

View File

@ -221,6 +221,8 @@ t_stop_start(_) ->
ok = emqx_resource:restart(?ID), ok = emqx_resource:restart(?ID),
timer:sleep(300),
#{pid := Pid1} = emqx_resource:query(?ID, get_state), #{pid := Pid1} = emqx_resource:query(?ID, get_state),
?assert(is_process_alive(Pid1)). ?assert(is_process_alive(Pid1)).