test: fix some compile warnings

This commit is contained in:
Zaiming (Stone) Shi 2023-12-11 08:42:35 +01:00
parent 50f4aba5cd
commit d560366c14
7 changed files with 17 additions and 9 deletions

View File

@ -175,11 +175,19 @@
%% 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()) ->
t().
-callback open(clientinfo(), conninfo(), conf()) ->
{_IsPresent :: true, t(), _ReplayContext} | false.
-callback destroy(t() | clientinfo()) -> ok.
-endif.
%%--------------------------------------------------------------------
%% Create a Session

View File

@ -262,7 +262,6 @@ t_write_failure(Config) ->
ProxyPort = ?config(proxy_port, Config),
ProxyHost = ?config(proxy_host, Config),
QueryMode = ?config(query_mode, Config),
EnableBatch = ?config(enable_batch, Config),
Data = rand_data(),
{{ok, _}, {ok, _}} =
?wait_async_action(

View File

@ -19,7 +19,7 @@
-behaviour(hocon_schema).
%% 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([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]).
@ -562,6 +562,8 @@ schema("/method/ok") ->
schema("/method/error") ->
#{operationId => test, bar => #{200 => <<"ok">>}}.
namespace() -> undefined.
fields(page) ->
[
{per_page,

View File

@ -680,6 +680,8 @@ to_schema(Object) ->
post => #{responses => #{200 => Object, 201 => Object}}
}.
namespace() -> undefined.
fields(good_ref) ->
[
{'webhook-host', mk(emqx_schema:ip_port(), #{default => <<"127.0.0.1:80">>})},

View File

@ -11,9 +11,6 @@
-export([store/2]).
-export([iterate/2]).
-type topic() :: list(binary()).
-type time() :: integer().
-opaque t() :: ets:tid().
-export_type([t/0]).

View File

@ -61,7 +61,7 @@
}.
%% For performance reasons we treat regular lists as streams, see `next/1'
-opaque cont(Data) ::
-type cont(Data) ::
fun(() -> stream(Data))
| stream(Data).
@ -78,11 +78,11 @@
chunk_size :: non_neg_integer()
}).
-opaque chunk_state() :: #chunk_state{}.
-type chunk_state() :: #chunk_state{}.
-record(interleave_state, {streams :: [{Tag :: term(), Stream :: term()}]}).
-opaque interleave_state() :: #interleave_state{}.
-type interleave_state() :: #interleave_state{}.
%% =============================================================================
%% API functions

View File

@ -281,7 +281,7 @@ t_uuid_restored_from_file(Config) ->
),
ok.
t_uuid_saved_to_file(Config) ->
t_uuid_saved_to_file(_Config) ->
DataDir = emqx:data_dir(),
NodeUUIDFile = filename:join(DataDir, "node.uuid"),
ClusterUUIDFile = filename:join(DataDir, "cluster.uuid"),