From f166b81702dbcb5a4682f669c988fa3086c65293 Mon Sep 17 00:00:00 2001 From: linjun <1045735402@qq.com> Date: Mon, 11 Mar 2019 14:24:54 +0800 Subject: [PATCH 1/3] Use broker_sys_interval instead of sys_interval --- src/emqx_sys.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqx_sys.erl b/src/emqx_sys.erl index ae80ae60e..3164cd92c 100644 --- a/src/emqx_sys.erl +++ b/src/emqx_sys.erl @@ -70,7 +70,7 @@ datetime() -> %% @doc Get sys interval -spec(sys_interval() -> pos_integer()). sys_interval() -> - application:get_env(?APP, sys_interval, 60000). + application:get_env(?APP, broker_sys_interval, 60000). %% @doc Get sys info -spec(info() -> list(tuple())). From 6816c1ac3e9b808323b8b7114a04c6af66dcc501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E5=AD=90=E5=8D=9A?= <349832309@qq.com> Date: Fri, 8 Mar 2019 10:33:49 +0800 Subject: [PATCH 2/3] Delete needless test case in emqx_protocol_SUITE --- test/emqx_protocol_SUITE.erl | 69 ------------------------------------ 1 file changed, 69 deletions(-) diff --git a/test/emqx_protocol_SUITE.erl b/test/emqx_protocol_SUITE.erl index a2d314acc..74271d685 100644 --- a/test/emqx_protocol_SUITE.erl +++ b/test/emqx_protocol_SUITE.erl @@ -31,67 +31,6 @@ username = <<"emqx">>, password = <<"public">>})). -% -record(pstate, { -% zone, -% sendfun, -% peername, -% peercert, -% proto_ver, -% proto_name, -% client_id, -% is_assigned, -% conn_pid, -% conn_props, -% ack_props, -% username, -% session, -% clean_start, -% topic_aliases, -% packet_size, -% keepalive, -% mountpoint, -% is_super, -% is_bridge, -% enable_ban, -% enable_acl, -% acl_deny_action, -% recv_stats, -% send_stats, -% connected, -% connected_at, -% ignore_loop, -% topic_alias_maximum, -% conn_mod -% }). - - -% -define(TEST_PSTATE(ProtoVer, SendStats), -% #pstate{zone = test, -% sendfun = fun(_Packet, _Options) -> ok end, -% peername = test_peername, -% peercert = test_peercert, -% proto_ver = ProtoVer, -% proto_name = <<"MQTT">>, -% client_id = <<"test_pstate">>, -% is_assigned = false, -% conn_pid = self(), -% username = <<"emqx">>, -% is_super = false, -% clean_start = false, -% topic_aliases = #{}, -% packet_size = 1000, -% mountpoint = <<>>, -% is_bridge = false, -% enable_ban = false, -% enable_acl = true, -% acl_deny_action = disconnect, -% recv_stats = #{msg => 0, pkt => 0}, -% send_stats = SendStats, -% connected = false, -% ignore_loop = false, -% topic_alias_maximum = #{to_client => 0, from_client => 0}, -% conn_mod = emqx_connection}). - all() -> [ {group, mqtt_common}, @@ -570,14 +509,6 @@ acl_deny_action_ct(_) -> emqx_zone:set_env(external, acl_deny_action, ignore), ok. -% acl_deny_action_eunit(_) -> -% PState = ?TEST_PSTATE(?MQTT_PROTO_V5, #{msg => 0, pkt => 0}), -% CodeName = emqx_reason_codes:name(?RC_NOT_AUTHORIZED, ?MQTT_PROTO_V5), -% {error, CodeName, NEWPSTATE1} = emqx_protocol:process(?PUBLISH_PACKET(?QOS_1, <<"acl_deny_action">>, 1, <<"payload">>), PState), -% ?assertEqual(#{pkt => 1, msg => 0}, NEWPSTATE1#pstate.send_stats), -% {error, CodeName, NEWPSTATE2} = emqx_protocol:process(?PUBLISH_PACKET(?QOS_2, <<"acl_deny_action">>, 2, <<"payload">>), PState), -% ?assertEqual(#{pkt => 1, msg => 0}, NEWPSTATE2#pstate.send_stats). - will_topic_check(_) -> {ok, Client} = emqx_client:start_link([{username, <<"emqx">>}, {will_flag, true}, From b51747f03ec9cb7730646ac233484a2b04c7d003 Mon Sep 17 00:00:00 2001 From: turtled Date: Tue, 12 Mar 2019 22:34:40 +0800 Subject: [PATCH 3/3] Export find_plugin --- src/emqx_plugins.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/emqx_plugins.erl b/src/emqx_plugins.erl index 8a958db5a..c108f8b33 100644 --- a/src/emqx_plugins.erl +++ b/src/emqx_plugins.erl @@ -24,6 +24,8 @@ -export([list/0]). +-export([find_plugin/1]). + -export([load_expand_plugin/1]). %% @doc Init plugins' config