Просмотр исходного кода

fix(test): fix check paho test cases fail

Turtle 4 лет назад
Родитель
Сommit
7b38ae7f47

+ 1 - 1
apps/emqx/etc/emqx.conf

@@ -1146,7 +1146,7 @@ zones.default {
     ## @doc zones.<name>.flapping_detect.enable
     ## ValueType: Boolean
     ## Default: true
-    enable: true
+    enable: false
 
     ## The max disconnect allowed of a MQTT Client in `window_time`
     ##

+ 1 - 1
apps/emqx/src/emqx_schema.erl

@@ -314,7 +314,7 @@ fields("rate_limit_quota") ->
     ];
 
 fields("flapping_detect") ->
-    [ {"enable", t(boolean(), undefined, true)}
+    [ {"enable", t(boolean(), undefined, false)}
     , {"max_count", t(integer(), undefined, 15)}
     , {"window_time", t(duration(), undefined, "1m")}
     , {"ban_time", t(duration(), undefined, "5m")}

+ 35 - 35
apps/emqx_gateway/etc/emqx_gateway.conf

@@ -29,46 +29,46 @@ emqx_gateway: {
         }
     }
 
-    mqttsn.1: {
-        ## The MQTT-SN Gateway ID in ADVERTISE message.
-        gateway_id: 1
+    # mqttsn.1: {
+    #     ## The MQTT-SN Gateway ID in ADVERTISE message.
+    #     gateway_id: 1
 
-        ## Enable broadcast this gateway to WLAN
-        broadcast: true
+    #     ## Enable broadcast this gateway to WLAN
+    #     broadcast: true
 
-        ## To control whether write statistics data into ETS table
-        ## for dashbord to read.
-        enable_stats: true
+    #     ## To control whether write statistics data into ETS table
+    #     ## for dashbord to read.
+    #     enable_stats: true
 
-        ## To control whether accept and process the received
-        ## publish message with qos=-1.
-        enable_qos3: true
+    #     ## To control whether accept and process the received
+    #     ## publish message with qos=-1.
+    #     enable_qos3: true
 
-        ## Idle timeout for a MQTT-SN channel
-        idle_timeout: 30s
+    #     ## Idle timeout for a MQTT-SN channel
+    #     idle_timeout: 30s
 
-        ## The pre-defined topic name corresponding to the pre-defined topic
-        ## id of N.
-        ## Note that the pre-defined topic id of 0 is reserved.
-        predefined: [
-            { id: 1
-              topic: "/predefined/topic/name/hello"
-            },
-            { id: 2
-              topic: "/predefined/topic/name/nice"
-            }
-        ]
+    #     ## The pre-defined topic name corresponding to the pre-defined topic
+    #     ## id of N.
+    #     ## Note that the pre-defined topic id of 0 is reserved.
+    #     predefined: [
+    #         { id: 1
+    #           topic: "/predefined/topic/name/hello"
+    #         },
+    #         { id: 2
+    #           topic: "/predefined/topic/name/nice"
+    #         }
+    #     ]
 
-        ### ClientInfo override
-        clientinfo_override: {
-            username: "mqtt_sn_user"
-            password: "abc"
-        }
+    #     ### ClientInfo override
+    #     clientinfo_override: {
+    #         username: "mqtt_sn_user"
+    #         password: "abc"
+    #     }
 
-        listener.udp.1: {
-            bind: 1884
-            max_connections: 10240000
-            max_conn_rate: 1000
-        }
-    }
+    #     listener.udp.1: {
+    #         bind: 1884
+    #         max_connections: 10240000
+    #         max_conn_rate: 1000
+    #     }
+    # }
 }

+ 1 - 1
apps/emqx_retainer/src/emqx_retainer.erl

@@ -112,7 +112,7 @@ dispatch(Context, Pid, Topic, Cursor) ->
     case Cursor =/= undefined orelse emqx_topic:wildcard(Topic) of
         false ->
             {ok, Result} = Mod:read_message(Context, Topic),
-            deliver(Result, Context, Pid, Topic, undefiend);
+            deliver(Result, Context, Pid, Topic, undefined);
         true  ->
             {ok, Result, NewCursor} =  Mod:match_messages(Context, Topic, Cursor),
             deliver(Result, Context, Pid, Topic, NewCursor)