diff --git a/changes/v4.3.22-en.md b/changes/v4.3.22-en.md index 384a41a3d..67c62f4bd 100644 --- a/changes/v4.3.22-en.md +++ b/changes/v4.3.22-en.md @@ -2,6 +2,9 @@ ## Enhancements + +- Remove useless information from the dashboard listener failure log [#9260](https://github.com/emqx/emqx/pull/9260). + - We now trigger the `'message.acked'` hook after the CoAP gateway sends a message to the device and receives the ACK from the device [#9264](https://github.com/emqx/emqx/pull/9264). With this change, the CoAP gateway can be combined with the offline message caching function (in the emqx enterprise), so that CoAP devices are able to read the missed messages from the database when diff --git a/changes/v4.3.22-zh.md b/changes/v4.3.22-zh.md index d8d407f99..e40fa0737 100644 --- a/changes/v4.3.22-zh.md +++ b/changes/v4.3.22-zh.md @@ -2,6 +2,8 @@ ## 增强 +- 删除 Dashboard 监听器失败时日志中的无用信息 [#9260](https://github.com/emqx/emqx/pull/9260). + - 当 CoAP 网关给设备投递消息并收到设备发来的确认之后,回调 `'message.acked'` 钩子 [#9264](https://github.com/emqx/emqx/pull/9264)。 有了这个改动,CoAP 网关可以配合 EMQX (企业版)的离线消息缓存功能,让 CoAP 设备重新上线之后,从数据库读取其离线状态下错过的消息。 diff --git a/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl b/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl index b1a8c0194..b05615e03 100644 --- a/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl +++ b/lib-ce/emqx_dashboard/test/emqx_dashboard_SUITE.erl @@ -54,7 +54,7 @@ groups() -> {overview, [sequence], [t_overview]}, {admins, [sequence], [t_admins_add_delete, t_admins_persist_default_password, t_default_password_persists_after_leaving_cluster]}, {rest, [sequence], [t_rest_api]}, - {cli, [sequence], [t_cli]} + {cli, [sequence], [t_cli, t_start_listener_failed_log]} ]. init_per_suite(Config) -> @@ -236,6 +236,21 @@ t_cli(_Config) -> AdminList = emqx_dashboard_admin:all_users(), ?assertEqual(2, length(AdminList)). +t_start_listener_failed_log({init, Config}) -> + _ = application:stop(emqx_dashboard), + Config; +t_start_listener_failed_log({'end', _Config}) -> + _ = application:start(emqx_dashboard), + ok; +t_start_listener_failed_log(_Config) -> + ct:capture_start(), + Options = [{num_acceptors,4}, {max_connections,512}, {inet6,false}, {ipv6_v6only,false}], + ?assertError(_, emqx_dashboard:start_listener({http, {"1.1.1.1", 8080}, Options})), + ct:capture_stop(), + I0 = ct:capture_get(), + ?assertMatch({match, _}, re:run(iolist_to_binary(I0), "eaddrnotavail", [])), + ok. + %%------------------------------------------------------------------------------ %% Internal functions %%------------------------------------------------------------------------------ diff --git a/rebar.config b/rebar.config index 86436101b..26fbf7f8e 100644 --- a/rebar.config +++ b/rebar.config @@ -50,7 +50,7 @@ , {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.8.1.11"}}} , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.5.2"}}} , {cuttlefish, {git, "https://github.com/emqx/cuttlefish", {tag, "v3.3.6"}}} - , {minirest, {git, "https://github.com/emqx/minirest", {tag, "0.3.9"}}} + , {minirest, {git, "https://github.com/emqx/minirest", {tag, "0.3.10"}}} , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.2"}}} , {replayq, {git, "https://github.com/emqx/replayq", {tag, "0.3.4"}}} , {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {branch, "2.0.4"}}}