test: fix some compile warnings
This commit is contained in:
parent
50f4aba5cd
commit
d560366c14
|
@ -175,11 +175,19 @@
|
||||||
%% Behaviour
|
%% Behaviour
|
||||||
%% -------------------------------------------------------------------
|
%% -------------------------------------------------------------------
|
||||||
|
|
||||||
|
-if(?OTP_RELEASE < 26).
|
||||||
|
-callback create(clientinfo(), conninfo(), conf()) ->
|
||||||
|
term().
|
||||||
|
-callback open(clientinfo(), conninfo(), conf()) ->
|
||||||
|
term().
|
||||||
|
-callback destroy(t() | clientinfo()) -> ok.
|
||||||
|
-else.
|
||||||
-callback create(clientinfo(), conninfo(), conf()) ->
|
-callback create(clientinfo(), conninfo(), conf()) ->
|
||||||
t().
|
t().
|
||||||
-callback open(clientinfo(), conninfo(), conf()) ->
|
-callback open(clientinfo(), conninfo(), conf()) ->
|
||||||
{_IsPresent :: true, t(), _ReplayContext} | false.
|
{_IsPresent :: true, t(), _ReplayContext} | false.
|
||||||
-callback destroy(t() | clientinfo()) -> ok.
|
-callback destroy(t() | clientinfo()) -> ok.
|
||||||
|
-endif.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Create a Session
|
%% Create a Session
|
||||||
|
|
|
@ -262,7 +262,6 @@ t_write_failure(Config) ->
|
||||||
ProxyPort = ?config(proxy_port, Config),
|
ProxyPort = ?config(proxy_port, Config),
|
||||||
ProxyHost = ?config(proxy_host, Config),
|
ProxyHost = ?config(proxy_host, Config),
|
||||||
QueryMode = ?config(query_mode, Config),
|
QueryMode = ?config(query_mode, Config),
|
||||||
EnableBatch = ?config(enable_batch, Config),
|
|
||||||
Data = rand_data(),
|
Data = rand_data(),
|
||||||
{{ok, _}, {ok, _}} =
|
{{ok, _}, {ok, _}} =
|
||||||
?wait_async_action(
|
?wait_async_action(
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
-behaviour(hocon_schema).
|
-behaviour(hocon_schema).
|
||||||
|
|
||||||
%% API
|
%% API
|
||||||
-export([paths/0, api_spec/0, schema/1, fields/1]).
|
-export([paths/0, api_spec/0, schema/1, namespace/0, fields/1]).
|
||||||
-export([init_per_suite/1, end_per_suite/1]).
|
-export([init_per_suite/1, end_per_suite/1]).
|
||||||
-export([t_in_path/1, t_in_query/1, t_in_mix/1, t_without_in/1, t_ref/1, t_public_ref/1]).
|
-export([t_in_path/1, t_in_query/1, t_in_mix/1, t_without_in/1, t_ref/1, t_public_ref/1]).
|
||||||
-export([t_require/1, t_query_enum/1, t_nullable/1, t_method/1, t_api_spec/1]).
|
-export([t_require/1, t_query_enum/1, t_nullable/1, t_method/1, t_api_spec/1]).
|
||||||
|
@ -562,6 +562,8 @@ schema("/method/ok") ->
|
||||||
schema("/method/error") ->
|
schema("/method/error") ->
|
||||||
#{operationId => test, bar => #{200 => <<"ok">>}}.
|
#{operationId => test, bar => #{200 => <<"ok">>}}.
|
||||||
|
|
||||||
|
namespace() -> undefined.
|
||||||
|
|
||||||
fields(page) ->
|
fields(page) ->
|
||||||
[
|
[
|
||||||
{per_page,
|
{per_page,
|
||||||
|
|
|
@ -680,6 +680,8 @@ to_schema(Object) ->
|
||||||
post => #{responses => #{200 => Object, 201 => Object}}
|
post => #{responses => #{200 => Object, 201 => Object}}
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
namespace() -> undefined.
|
||||||
|
|
||||||
fields(good_ref) ->
|
fields(good_ref) ->
|
||||||
[
|
[
|
||||||
{'webhook-host', mk(emqx_schema:ip_port(), #{default => <<"127.0.0.1:80">>})},
|
{'webhook-host', mk(emqx_schema:ip_port(), #{default => <<"127.0.0.1:80">>})},
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
-export([store/2]).
|
-export([store/2]).
|
||||||
-export([iterate/2]).
|
-export([iterate/2]).
|
||||||
|
|
||||||
-type topic() :: list(binary()).
|
|
||||||
-type time() :: integer().
|
|
||||||
|
|
||||||
-opaque t() :: ets:tid().
|
-opaque t() :: ets:tid().
|
||||||
|
|
||||||
-export_type([t/0]).
|
-export_type([t/0]).
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
}.
|
}.
|
||||||
|
|
||||||
%% For performance reasons we treat regular lists as streams, see `next/1'
|
%% For performance reasons we treat regular lists as streams, see `next/1'
|
||||||
-opaque cont(Data) ::
|
-type cont(Data) ::
|
||||||
fun(() -> stream(Data))
|
fun(() -> stream(Data))
|
||||||
| stream(Data).
|
| stream(Data).
|
||||||
|
|
||||||
|
@ -78,11 +78,11 @@
|
||||||
chunk_size :: non_neg_integer()
|
chunk_size :: non_neg_integer()
|
||||||
}).
|
}).
|
||||||
|
|
||||||
-opaque chunk_state() :: #chunk_state{}.
|
-type chunk_state() :: #chunk_state{}.
|
||||||
|
|
||||||
-record(interleave_state, {streams :: [{Tag :: term(), Stream :: term()}]}).
|
-record(interleave_state, {streams :: [{Tag :: term(), Stream :: term()}]}).
|
||||||
|
|
||||||
-opaque interleave_state() :: #interleave_state{}.
|
-type interleave_state() :: #interleave_state{}.
|
||||||
|
|
||||||
%% =============================================================================
|
%% =============================================================================
|
||||||
%% API functions
|
%% API functions
|
||||||
|
|
|
@ -281,7 +281,7 @@ t_uuid_restored_from_file(Config) ->
|
||||||
),
|
),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
t_uuid_saved_to_file(Config) ->
|
t_uuid_saved_to_file(_Config) ->
|
||||||
DataDir = emqx:data_dir(),
|
DataDir = emqx:data_dir(),
|
||||||
NodeUUIDFile = filename:join(DataDir, "node.uuid"),
|
NodeUUIDFile = filename:join(DataDir, "node.uuid"),
|
||||||
ClusterUUIDFile = filename:join(DataDir, "cluster.uuid"),
|
ClusterUUIDFile = filename:join(DataDir, "cluster.uuid"),
|
||||||
|
|
Loading…
Reference in New Issue