chore: typo fixes

This commit is contained in:
JianBo He 2023-04-12 11:34:04 +08:00
parent aee85dc328
commit 9560fdc5a2
2 changed files with 21 additions and 17 deletions

View File

@ -591,20 +591,24 @@ t_missing_data(Config) ->
), ),
%% emqx_ee_connector_cassa will send missed data as a `null` atom %% emqx_ee_connector_cassa will send missed data as a `null` atom
%% to ecql driver %% to ecql driver
?check_trace(
begin
?wait_async_action(
send_message(Config, #{}), send_message(Config, #{}),
?block_until( #{?snk_kind := handle_async_reply, result := {error, {8704, _}}},
#{ 10_000
?snk_kind := buffer_worker_flush_ack,
result := {async_return, ok}
},
2_000
), ),
?block_until( ok
#{ end,
?snk_kind := handle_async_reply_enter, fun(Trace0) ->
result := {error, {8704, _}} %% 1. ecql driver will return `ok` first in async query
}, Trace = ?of_kind(cassandra_connector_query_return, Trace0),
2_000 ?assertMatch([#{result := ok}], Trace),
%% 2. then it will return an error in callback function
Trace1 = ?of_kind(handle_async_reply, Trace0),
?assertMatch([#{result := {error, {8704, _}}}], Trace1),
ok
end
), ),
ok. ok.

View File

@ -175,7 +175,7 @@ on_query(
Request, Request,
State State
) -> ) ->
do_signle_query(InstId, Request, sync, State). do_single_query(InstId, Request, sync, State).
-spec on_query_async( -spec on_query_async(
emqx_resource:resource_id(), emqx_resource:resource_id(),
@ -189,9 +189,9 @@ on_query_async(
Callback, Callback,
State State
) -> ) ->
do_signle_query(InstId, Request, {async, Callback}, State). do_single_query(InstId, Request, {async, Callback}, State).
do_signle_query( do_single_query(
InstId, InstId,
Request, Request,
Async, Async,