diff --git a/apps/emqx_lua_hook/test/emqx_lua_hook_SUITE.erl b/apps/emqx_lua_hook/test/emqx_lua_hook_SUITE.erl index c47083ae0..f2f4ad8d0 100644 --- a/apps/emqx_lua_hook/test/emqx_lua_hook_SUITE.erl +++ b/apps/emqx_lua_hook/test/emqx_lua_hook_SUITE.erl @@ -141,7 +141,6 @@ case11(_Config) -> Msg = #message{qos = 2, flags = #{retain => true}, topic = <<"a/b/c">>, payload = <<"123">>, headers = #{}}, Ret = emqx_hooks:run_fold('message.delivered', [#{clientid => <<"myclient">>, username => <<"myuser">>}], Msg), ?assertEqual(Msg, Ret), - emqx_lua_hook:stop(), ok = file:delete(ScriptName). case12(_Config) -> @@ -203,7 +202,6 @@ case22(_Config) -> Msg = #message{qos = 2, flags = #{retain => true}, topic = <<"a/b/c">>, payload = <<"123">>, headers = #{}}, Ret = emqx_hooks:run('message.acked', [#{clientid => <<"myclient">>, username => <<"myuser">>}, Msg]), ?assertEqual(ok, Ret), - emqx_lua_hook:stop(), ok = file:delete(ScriptName). case31(_Config) -> diff --git a/apps/emqx_lwm2m/test/emqx_lwm2m_SUITE.erl b/apps/emqx_lwm2m/test/emqx_lwm2m_SUITE.erl index 37b7f298d..a77a44dfe 100644 --- a/apps/emqx_lwm2m/test/emqx_lwm2m_SUITE.erl +++ b/apps/emqx_lwm2m/test/emqx_lwm2m_SUITE.erl @@ -188,9 +188,9 @@ case01_register(Config) -> #coap_message{type = ack, id = RspId3, method = Method3} = test_recv_coap_response(UdpSock), {ok,deleted} = Method3, MsgId3 = RspId3, + timer:sleep(50), false = lists:member(SubTopic, test_mqtt_broker:get_subscrbied_topics()). - case01_register_additional_opts(Config) -> % ---------------------------------------- % REGISTER command @@ -236,6 +236,7 @@ case01_register_additional_opts(Config) -> #coap_message{type = ack, id = RspId3, method = Method3} = test_recv_coap_response(UdpSock), {ok,deleted} = Method3, MsgId3 = RspId3, + timer:sleep(50), false = lists:member(SubTopic, test_mqtt_broker:get_subscrbied_topics()). case01_register_incorrect_opts(Config) -> @@ -316,6 +317,7 @@ case01_register_report(Config) -> #coap_message{type = ack, id = RspId3, method = Method3} = test_recv_coap_response(UdpSock), {ok,deleted} = Method3, MsgId3 = RspId3, + timer:sleep(50), false = lists:member(SubTopic, test_mqtt_broker:get_subscrbied_topics()). case02_update_deregister(Config) -> @@ -395,7 +397,7 @@ case02_update_deregister(Config) -> {ok,deleted} = Method3, MsgId3 = RspId3, - timer:sleep(100), + timer:sleep(50), false = lists:member(SubTopic, test_mqtt_broker:get_subscrbied_topics()). case03_register_wrong_version(Config) ->