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
send_message(Config, #{}), ?check_trace(
?block_until( begin
#{ ?wait_async_action(
?snk_kind := buffer_worker_flush_ack, send_message(Config, #{}),
result := {async_return, ok} #{?snk_kind := handle_async_reply, result := {error, {8704, _}}},
}, 10_000
2_000 ),
), ok
?block_until( end,
#{ fun(Trace0) ->
?snk_kind := handle_async_reply_enter, %% 1. ecql driver will return `ok` first in async query
result := {error, {8704, _}} Trace = ?of_kind(cassandra_connector_query_return, Trace0),
}, ?assertMatch([#{result := ok}], Trace),
2_000 %% 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,