chore: make dialyzer && test happy

This commit is contained in:
firest 2023-05-31 18:06:06 +08:00
parent ce32526c96
commit cb31032e6d
3 changed files with 16 additions and 15 deletions

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_bridge_iotdb, [
{description, "EMQX Enterprise Apache IoTDB Bridge"},
{vsn, "0.1.1"},
{vsn, "0.1.2"},
{modules, [
emqx_bridge_iotdb,
emqx_bridge_iotdb_impl

View File

@ -23,35 +23,35 @@
scheme := http | https,
host := iolist(),
port := inet:port_number(),
path := '_'
path := _
},
connect_timeout := pos_integer(),
pool_type := random | hash,
pool_size := pos_integer(),
request := undefined | map(),
is_aligned := boolean(),
iotdb_version := binary(),
device_id := binary() | undefined,
atom() => '_'
request => undefined | map(),
is_aligned => boolean(),
iotdb_version => binary(),
device_id => binary() | undefined,
atom() => _
}.
-type state() ::
#{
base_path := '_',
base_path := _,
base_url := #{
scheme := http | https,
host := iolist(),
port := inet:port_number(),
path := '_'
path := _
},
connect_timeout := pos_integer(),
pool_type := random | hash,
pool_size := pos_integer(),
request := undefined | map(),
is_aligned := boolean(),
iotdb_version := binary(),
device_id := binary() | undefined,
atom() => '_'
request => undefined | map(),
is_aligned => boolean(),
iotdb_version => binary(),
device_id => binary() | undefined,
atom() => _
}.
-type manager_id() :: binary().

View File

@ -25,7 +25,8 @@ wrap_auth_headers_test_() ->
meck:expect(ehttpc_sup, start_pool, 2, {ok, foo}),
meck:expect(ehttpc, request, fun(_, _, Req, _, _) -> {ok, 200, Req} end),
meck:expect(ehttpc_pool, pick_worker, 1, self()),
[ehttpc_sup, ehttpc, ehttpc_pool]
meck:expect(emqx_resource, allocate_resource, 3, ok),
[ehttpc_sup, ehttpc, ehttpc_pool, emqx_resource]
end,
fun meck:unload/1, fun(_) ->
Config = #{