Merge pull request #8611 from thalesmg/fix-flaky-gw-test-50
test: fix flaky gateway tests
This commit is contained in:
commit
da6d6e8a9d
|
@ -3,7 +3,7 @@
|
||||||
{id, "emqx"},
|
{id, "emqx"},
|
||||||
{description, "EMQX Core"},
|
{description, "EMQX Core"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "5.0.4"},
|
{vsn, "5.0.5"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [
|
{applications, [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{application, emqx_dashboard, [
|
{application, emqx_dashboard, [
|
||||||
{description, "EMQX Web Dashboard"},
|
{description, "EMQX Web Dashboard"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "5.0.3"},
|
{vsn, "5.0.4"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_dashboard_sup]},
|
{registered, [emqx_dashboard_sup]},
|
||||||
{applications, [kernel, stdlib, mnesia, minirest, emqx]},
|
{applications, [kernel, stdlib, mnesia, minirest, emqx]},
|
||||||
|
|
|
@ -239,6 +239,7 @@ t_gateway_exproto_with_ssl(_) ->
|
||||||
t_authn(_) ->
|
t_authn(_) ->
|
||||||
GwConf = #{name => <<"stomp">>},
|
GwConf = #{name => <<"stomp">>},
|
||||||
{201, _} = request(post, "/gateway", GwConf),
|
{201, _} = request(post, "/gateway", GwConf),
|
||||||
|
ct:sleep(500),
|
||||||
{204, _} = request(get, "/gateway/stomp/authentication"),
|
{204, _} = request(get, "/gateway/stomp/authentication"),
|
||||||
|
|
||||||
AuthConf = #{
|
AuthConf = #{
|
||||||
|
@ -263,6 +264,7 @@ t_authn(_) ->
|
||||||
t_authn_data_mgmt(_) ->
|
t_authn_data_mgmt(_) ->
|
||||||
GwConf = #{name => <<"stomp">>},
|
GwConf = #{name => <<"stomp">>},
|
||||||
{201, _} = request(post, "/gateway", GwConf),
|
{201, _} = request(post, "/gateway", GwConf),
|
||||||
|
ct:sleep(500),
|
||||||
{204, _} = request(get, "/gateway/stomp/authentication"),
|
{204, _} = request(get, "/gateway/stomp/authentication"),
|
||||||
|
|
||||||
AuthConf = #{
|
AuthConf = #{
|
||||||
|
@ -271,6 +273,7 @@ t_authn_data_mgmt(_) ->
|
||||||
user_id_type => <<"clientid">>
|
user_id_type => <<"clientid">>
|
||||||
},
|
},
|
||||||
{201, _} = request(post, "/gateway/stomp/authentication", AuthConf),
|
{201, _} = request(post, "/gateway/stomp/authentication", AuthConf),
|
||||||
|
ct:sleep(500),
|
||||||
{200, ConfResp} = request(get, "/gateway/stomp/authentication"),
|
{200, ConfResp} = request(get, "/gateway/stomp/authentication"),
|
||||||
assert_confs(AuthConf, ConfResp),
|
assert_confs(AuthConf, ConfResp),
|
||||||
|
|
||||||
|
@ -374,6 +377,7 @@ t_listeners_authn(_) ->
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{201, _} = request(post, "/gateway", GwConf),
|
{201, _} = request(post, "/gateway", GwConf),
|
||||||
|
ct:sleep(500),
|
||||||
{200, ConfResp} = request(get, "/gateway/stomp"),
|
{200, ConfResp} = request(get, "/gateway/stomp"),
|
||||||
assert_confs(GwConf, ConfResp),
|
assert_confs(GwConf, ConfResp),
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ end_per_suite(_Conf) ->
|
||||||
|
|
||||||
init_per_testcase(_CaseName, Conf) ->
|
init_per_testcase(_CaseName, Conf) ->
|
||||||
_ = emqx_gateway_conf:unload_gateway(stomp),
|
_ = emqx_gateway_conf:unload_gateway(stomp),
|
||||||
|
ct:sleep(500),
|
||||||
Conf.
|
Conf.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
@ -282,6 +283,7 @@ t_load_remove_authn(_) ->
|
||||||
|
|
||||||
{ok, _} = emqx_gateway_conf:load_gateway(<<"stomp">>, StompConf),
|
{ok, _} = emqx_gateway_conf:load_gateway(<<"stomp">>, StompConf),
|
||||||
assert_confs(StompConf, emqx:get_raw_config([gateway, stomp])),
|
assert_confs(StompConf, emqx:get_raw_config([gateway, stomp])),
|
||||||
|
ct:sleep(500),
|
||||||
|
|
||||||
{ok, _} = emqx_gateway_conf:add_authn(<<"stomp">>, ?CONF_STOMP_AUTHN_1),
|
{ok, _} = emqx_gateway_conf:add_authn(<<"stomp">>, ?CONF_STOMP_AUTHN_1),
|
||||||
assert_confs(
|
assert_confs(
|
||||||
|
@ -314,6 +316,7 @@ t_load_remove_listeners(_) ->
|
||||||
|
|
||||||
{ok, _} = emqx_gateway_conf:load_gateway(<<"stomp">>, StompConf),
|
{ok, _} = emqx_gateway_conf:load_gateway(<<"stomp">>, StompConf),
|
||||||
assert_confs(StompConf, emqx:get_raw_config([gateway, stomp])),
|
assert_confs(StompConf, emqx:get_raw_config([gateway, stomp])),
|
||||||
|
ct:sleep(500),
|
||||||
|
|
||||||
{ok, _} = emqx_gateway_conf:add_listener(
|
{ok, _} = emqx_gateway_conf:add_listener(
|
||||||
<<"stomp">>,
|
<<"stomp">>,
|
||||||
|
@ -371,6 +374,7 @@ t_load_remove_listener_authn(_) ->
|
||||||
|
|
||||||
{ok, _} = emqx_gateway_conf:load_gateway(<<"stomp">>, StompConf),
|
{ok, _} = emqx_gateway_conf:load_gateway(<<"stomp">>, StompConf),
|
||||||
assert_confs(StompConf, emqx:get_raw_config([gateway, stomp])),
|
assert_confs(StompConf, emqx:get_raw_config([gateway, stomp])),
|
||||||
|
ct:sleep(500),
|
||||||
|
|
||||||
{ok, _} = emqx_gateway_conf:add_authn(
|
{ok, _} = emqx_gateway_conf:add_authn(
|
||||||
<<"stomp">>, {<<"tcp">>, <<"default">>}, ?CONF_STOMP_AUTHN_1
|
<<"stomp">>, {<<"tcp">>, <<"default">>}, ?CONF_STOMP_AUTHN_1
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{application, emqx_retainer, [
|
{application, emqx_retainer, [
|
||||||
{description, "EMQX Retainer"},
|
{description, "EMQX Retainer"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "5.0.2"},
|
{vsn, "5.0.3"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_retainer_sup]},
|
{registered, [emqx_retainer_sup]},
|
||||||
{applications, [kernel, stdlib, emqx]},
|
{applications, [kernel, stdlib, emqx]},
|
||||||
|
|
Loading…
Reference in New Issue