@@ -34,6 +34,11 @@
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
+-ifdef(TEST).
+-compile(export_all).
+-compile(nowarn_export_all).
+-endif.
+
-define(BROKER, ?MODULE).
%% ETS tables
@@ -42,7 +42,7 @@
-spec(start_link() -> emqx_types:startlink_ret()).
start_link() ->
- gen_server:start_link({local, ?SERVER}, ?MODULE, [], [{hibernate_after, 60000}]).
+ gen_server:start_link({local, ?SERVER}, ?MODULE, [], [{hibernate_after, 1000}]).
-spec(stop() -> ok).
stop() ->
@@ -35,7 +35,8 @@ start_link() ->
%% @doc Start pool.
-spec(start_link(atom(), pos_integer()) -> emqx_types:startlink_ret()).
start_link(Pool, Id) ->
- gen_server:start_link({local, emqx_misc:proc_name(?MODULE, Id)}, ?MODULE, [Pool, Id], []).
+ gen_server:start_link({local, emqx_misc:proc_name(?MODULE, Id)},
+ ?MODULE, [Pool, Id], [{hibernate_after, 1000}]).
%% @doc Submit work to the pool.
-spec(submit(task()) -> any()).