fix(test): fix check paho test cases fail

This commit is contained in:
Turtle 2021-07-17 17:09:16 +08:00
parent 1d2cb6cb81
commit 7b38ae7f47
4 changed files with 38 additions and 38 deletions

View File

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

View File

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

View File

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

View File

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