fix(typo): fix more typos and restore rate_limit config after test
This commit is contained in:
parent
bc8a0d7060
commit
2d46ae7517
|
@ -59,7 +59,7 @@ init_per_suite(Config) ->
|
|||
ok = meck:expect(emqx_alarm, deactivate, fun(_) -> ok end),
|
||||
ok = meck:expect(emqx_alarm, deactivate, fun(_, _) -> ok end),
|
||||
|
||||
emqx_channel_SUITE:set_test_listenser_confs(),
|
||||
emqx_channel_SUITE:set_test_listener_confs(),
|
||||
Config.
|
||||
|
||||
end_per_suite(_Config) ->
|
||||
|
|
|
@ -42,6 +42,7 @@ init_per_testcase(Case, Config)
|
|||
when Case =:= t_max_conns_tcp; Case =:= t_current_conns_tcp ->
|
||||
{ok, _} = emqx_config_handler:start_link(),
|
||||
PrevListeners = emqx_config:get([listeners, tcp], #{}),
|
||||
PrevRateLimit = emqx_config:get([rate_limit], #{}),
|
||||
emqx_config:put([listeners, tcp], #{ listener_test =>
|
||||
#{ bind => {"127.0.0.1", 9999}
|
||||
, max_connections => 4321
|
||||
|
@ -53,6 +54,7 @@ init_per_testcase(Case, Config)
|
|||
ok = emqx_listeners:start(),
|
||||
[ {listener_conf, ListenerConf}
|
||||
, {prev_listener_conf, PrevListeners}
|
||||
, {prev_rate_limit_conf, PrevRateLimit}
|
||||
| Config];
|
||||
init_per_testcase(_, Config) ->
|
||||
{ok, _} = emqx_config_handler:start_link(),
|
||||
|
@ -61,7 +63,9 @@ init_per_testcase(_, Config) ->
|
|||
end_per_testcase(Case, Config)
|
||||
when Case =:= t_max_conns_tcp; Case =:= t_current_conns_tcp ->
|
||||
PrevListener = ?config(prev_listener_conf, Config),
|
||||
PrevRateLimit = ?config(prev_rate_limit_conf, Config),
|
||||
emqx_config:put([listeners, tcp], PrevListener),
|
||||
emqx_config:put([rate_limit], PrevRateLimit),
|
||||
emqx_listeners:stop(),
|
||||
_ = emqx_config_handler:stop(),
|
||||
ok;
|
||||
|
|
|
@ -29,7 +29,7 @@ all() -> emqx_common_test_helpers:all(?MODULE).
|
|||
%%--------------------------------------------------------------------
|
||||
|
||||
init_per_suite(Config) ->
|
||||
emqx_channel_SUITE:set_test_listenser_confs(),
|
||||
emqx_channel_SUITE:set_test_listener_confs(),
|
||||
ok = meck:new([emqx_hooks, emqx_metrics, emqx_broker],
|
||||
[passthrough, no_history, no_link]),
|
||||
ok = meck:expect(emqx_metrics, inc, fun(_) -> ok end),
|
||||
|
|
Loading…
Reference in New Issue