fix: tests
This commit is contained in:
parent
8bc874c261
commit
a694f3c92d
|
@ -6,7 +6,7 @@
|
|||
{emqx_connector, {path, "../../apps/emqx_connector"}},
|
||||
{emqx_resource, {path, "../../apps/emqx_resource"}},
|
||||
{emqx_bridge, {path, "../../apps/emqx_bridge"}},
|
||||
{greptimedb, {git, "https://github.com/GreptimeTeam/greptimedb-client-erl", {tag, "v0.1.3"}}}
|
||||
{greptimedb, {git, "https://github.com/GreptimeTeam/greptimedb-client-erl", {tag, "v0.1.4"}}}
|
||||
]}.
|
||||
{plugins, [rebar3_path_deps]}.
|
||||
{project_plugins, [erlfmt]}.
|
||||
|
|
|
@ -797,11 +797,29 @@ t_bad_timestamp(Config) ->
|
|||
#{?snk_kind := greptimedb_connector_send_query_error},
|
||||
10_000
|
||||
),
|
||||
fun(Result, _Trace) ->
|
||||
fun(Result, Trace) ->
|
||||
?assertMatch({_, {ok, _}}, Result),
|
||||
{Return, {ok, _}} = Result,
|
||||
IsBatch = BatchSize > 1,
|
||||
case {QueryMode, IsBatch} of
|
||||
{async, true} ->
|
||||
?assertEqual(ok, Return),
|
||||
?assertMatch(
|
||||
[#{error := points_trans_failed}],
|
||||
?of_kind(greptimedb_connector_send_query_error, Trace)
|
||||
);
|
||||
{async, false} ->
|
||||
?assertEqual(ok, Return),
|
||||
?assertMatch(
|
||||
[
|
||||
#{
|
||||
error := [
|
||||
{error, {bad_timestamp, <<"bad_timestamp">>}}
|
||||
]
|
||||
}
|
||||
],
|
||||
?of_kind(greptimedb_connector_send_query_error, Trace)
|
||||
);
|
||||
{sync, false} ->
|
||||
?assertEqual(
|
||||
{error, [
|
||||
|
|
Loading…
Reference in New Issue