test: fix failed tests
This commit is contained in:
parent
a5ac5b6f3a
commit
c1afb34a86
|
@ -115,7 +115,7 @@ message_expiry_interval_init() ->
|
|||
message_expiry_interval_exipred(CPublish, CControl, QoS) ->
|
||||
ct:pal("~p ~p", [?FUNCTION_NAME, QoS]),
|
||||
%% publish to t/a and waiting for the message expired
|
||||
emqtt:publish(
|
||||
_ = emqtt:publish(
|
||||
CPublish,
|
||||
<<"t/a">>,
|
||||
#{'Message-Expiry-Interval' => 1},
|
||||
|
@ -152,7 +152,7 @@ message_expiry_interval_exipred(CPublish, CControl, QoS) ->
|
|||
message_expiry_interval_not_exipred(CPublish, CControl, QoS) ->
|
||||
ct:pal("~p ~p", [?FUNCTION_NAME, QoS]),
|
||||
%% publish to t/a
|
||||
emqtt:publish(
|
||||
_ = emqtt:publish(
|
||||
CPublish,
|
||||
<<"t/a">>,
|
||||
#{'Message-Expiry-Interval' => 20},
|
||||
|
|
|
@ -529,8 +529,11 @@ t_connack_max_qos_allowed(Config) ->
|
|||
%% [MQTT-3.2.2-10]
|
||||
{ok, _, [2]} = emqtt:subscribe(Client1, Topic, 2),
|
||||
|
||||
{ok, _} = emqtt:publish(Client1, Topic, <<"Unsupported Qos 1">>, qos1),
|
||||
%% [MQTT-3.2.2-11]
|
||||
?assertMatch(
|
||||
{error, {disconnected, 155, _}},
|
||||
emqtt:publish(Client1, Topic, <<"Unsupported Qos 1">>, qos1)
|
||||
),
|
||||
?assertEqual(155, receive_disconnect_reasoncode()),
|
||||
waiting_client_process_exit(Client1),
|
||||
|
||||
|
@ -563,8 +566,11 @@ t_connack_max_qos_allowed(Config) ->
|
|||
%% [MQTT-3.2.2-10]
|
||||
{ok, _, [2]} = emqtt:subscribe(Client3, Topic, 2),
|
||||
|
||||
{ok, _} = emqtt:publish(Client3, Topic, <<"Unsupported Qos 2">>, qos2),
|
||||
%% [MQTT-3.2.2-11]
|
||||
?assertMatch(
|
||||
{error, {disconnected, 155, _}},
|
||||
emqtt:publish(Client3, Topic, <<"Unsupported Qos 2">>, qos2)
|
||||
),
|
||||
?assertEqual(155, receive_disconnect_reasoncode()),
|
||||
waiting_client_process_exit(Client3),
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
-include_lib("typerefl/include/types.hrl").
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-include_lib("emqx/include/logger.hrl").
|
||||
-include_lib("emqx_resource/include/emqx_resource.hrl").
|
||||
-include_lib("emqx_bridge/include/emqx_bridge.hrl").
|
||||
|
||||
-import(hoconsc, [mk/2, array/1, enum/1]).
|
||||
|
@ -232,11 +231,11 @@ mqtt_main_example() ->
|
|||
retry_interval => <<"15s">>,
|
||||
max_inflight => 100,
|
||||
resource_opts => #{
|
||||
health_check_interval => ?HEALTHCHECK_INTERVAL_RAW,
|
||||
auto_restart_interval => ?AUTO_RESTART_INTERVAL_RAW,
|
||||
health_check_interval => <<"15s">>,
|
||||
auto_restart_interval => <<"60s">>,
|
||||
query_mode => sync,
|
||||
enable_queue => false,
|
||||
max_queue_bytes => ?DEFAULT_QUEUE_SIZE
|
||||
max_queue_bytes => 100 * 1024 * 1024
|
||||
},
|
||||
ssl => #{
|
||||
enable => false
|
||||
|
|
Loading…
Reference in New Issue