diff --git a/src/emqttd_boot.erl b/src/emqttd_boot.erl index 054b57bde..e2ca2b931 100644 --- a/src/emqttd_boot.erl +++ b/src/emqttd_boot.erl @@ -18,10 +18,6 @@ -export([apply_module_attributes/1, all_module_attributes/1]). --ifdef(TEST). --compile(export_all). --endif. - %% only {F, Args}... apply_module_attributes(Name) -> [{Module, [apply(Module, F, Args) || {F, Args} <- Attrs]} || diff --git a/src/emqttd_message.erl b/src/emqttd_message.erl index ccceb0b9d..172a86c79 100644 --- a/src/emqttd_message.erl +++ b/src/emqttd_message.erl @@ -28,10 +28,6 @@ -export([format/1]). --ifdef(TEST). --compile(export_all). --endif. - %% @doc Make a message -spec make(From, Topic, Payload) -> mqtt_message() when From :: atom() | binary(), diff --git a/src/emqttd_mnesia.erl b/src/emqttd_mnesia.erl index e1589d07c..3ecf06277 100644 --- a/src/emqttd_mnesia.erl +++ b/src/emqttd_mnesia.erl @@ -30,9 +30,6 @@ %% Schema and tables -export([copy_schema/1, delete_schema/0, del_schema_copy/1, create_table/2, copy_table/1, copy_table/2]). --ifdef(TEST). --compile(export_all). --endif. %%-------------------------------------------------------------------- %% Start and init mnesia diff --git a/src/emqttd_mod_subscription.erl b/src/emqttd_mod_subscription.erl index 93c96d0d9..098fc592d 100644 --- a/src/emqttd_mod_subscription.erl +++ b/src/emqttd_mod_subscription.erl @@ -27,10 +27,6 @@ -record(state, {topics, stored = false}). --ifdef(TEST). --compile(export_all). --endif. - load(Opts) -> Topics = [{iolist_to_binary(Topic), QoS} || {Topic, QoS} <- Opts, ?IS_QOS(QoS)], State = #state{topics = Topics, stored = lists:member(stored, Opts)}, diff --git a/src/emqttd_packet.erl b/src/emqttd_packet.erl index 0fdbdc545..f419a16ba 100644 --- a/src/emqttd_packet.erl +++ b/src/emqttd_packet.erl @@ -26,10 +26,6 @@ -export([format/1]). --ifdef(TEST). --compile(export_all). --endif. - %% @doc Protocol name of version -spec protocol_name(mqtt_vsn()) -> binary(). protocol_name(Ver) when Ver =:= ?MQTT_PROTO_V31; Ver =:= ?MQTT_PROTO_V311 -> diff --git a/src/emqttd_pubsub.erl b/src/emqttd_pubsub.erl index cab13ee3e..eb60fdb1a 100644 --- a/src/emqttd_pubsub.erl +++ b/src/emqttd_pubsub.erl @@ -43,10 +43,6 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). --ifdef(TEST). --compile(export_all). --endif. - -record(state, {pool, id, statsfun}). -define(ROUTER, emqttd_router). diff --git a/src/emqttd_pubsub_sup.erl b/src/emqttd_pubsub_sup.erl index a0cf50749..532f3c2a0 100644 --- a/src/emqttd_pubsub_sup.erl +++ b/src/emqttd_pubsub_sup.erl @@ -31,10 +31,6 @@ %% Supervisor callbacks -export([init/1]). --ifdef(TEST). --compile(export_all). --endif. - start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, [emqttd_broker:env(pubsub)]). diff --git a/src/emqttd_router.erl b/src/emqttd_router.erl index 848ff80a6..5fc025d8d 100644 --- a/src/emqttd_router.erl +++ b/src/emqttd_router.erl @@ -45,10 +45,6 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). --ifdef(TEST). --compile(export_all). --endif. - -record(aging, {topics, time, tref}). -record(state, {pool, id, aging :: #aging{}, statsfun}).