Browse Source

test: fix flaky gateway tests

Thales Macedo Garitezi 3 năm trước cách đây
mục cha
commit
d2e146aeff

+ 3 - 1
apps/emqx_gateway/test/emqx_gateway_auth_ct.erl

@@ -143,7 +143,9 @@ on_start_auth(authn_http) ->
     Setup = fun(Gateway) ->
         Path = io_lib:format("/gateway/~ts/authentication", [Gateway]),
         {204, _} = request(delete, Path),
-        {201, _} = request(post, Path, http_authn_config())
+        timer:sleep(200),
+        {201, _} = request(post, Path, http_authn_config()),
+        timer:sleep(200)
     end,
     lists:foreach(Setup, ?GATEWAYS),
 

+ 1 - 1
apps/emqx_gateway/test/emqx_sn_protocol_SUITE.erl

@@ -103,7 +103,7 @@ init_per_suite(Config) ->
 
 end_per_suite(_) ->
     {ok, _} = emqx:remove_config([gateway, mqttsn]),
-    emqx_mgmt_api_test_util:end_suite([emqx_gateway, emqx_auhtn, emqx_conf]).
+    emqx_mgmt_api_test_util:end_suite([emqx_gateway, emqx_authn, emqx_conf]).
 
 restart_mqttsn_with_subs_resume_on() ->
     Conf = emqx:get_raw_config([gateway, mqttsn]),