fix: tests
This commit is contained in:
parent
8bc874c261
commit
a694f3c92d
|
@ -6,7 +6,7 @@
|
||||||
{emqx_connector, {path, "../../apps/emqx_connector"}},
|
{emqx_connector, {path, "../../apps/emqx_connector"}},
|
||||||
{emqx_resource, {path, "../../apps/emqx_resource"}},
|
{emqx_resource, {path, "../../apps/emqx_resource"}},
|
||||||
{emqx_bridge, {path, "../../apps/emqx_bridge"}},
|
{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]}.
|
{plugins, [rebar3_path_deps]}.
|
||||||
{project_plugins, [erlfmt]}.
|
{project_plugins, [erlfmt]}.
|
||||||
|
|
|
@ -797,11 +797,29 @@ t_bad_timestamp(Config) ->
|
||||||
#{?snk_kind := greptimedb_connector_send_query_error},
|
#{?snk_kind := greptimedb_connector_send_query_error},
|
||||||
10_000
|
10_000
|
||||||
),
|
),
|
||||||
fun(Result, _Trace) ->
|
fun(Result, Trace) ->
|
||||||
?assertMatch({_, {ok, _}}, Result),
|
?assertMatch({_, {ok, _}}, Result),
|
||||||
{Return, {ok, _}} = Result,
|
{Return, {ok, _}} = Result,
|
||||||
IsBatch = BatchSize > 1,
|
IsBatch = BatchSize > 1,
|
||||||
case {QueryMode, IsBatch} of
|
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} ->
|
{sync, false} ->
|
||||||
?assertEqual(
|
?assertEqual(
|
||||||
{error, [
|
{error, [
|
||||||
|
|
Loading…
Reference in New Issue