From db34911a3fd4c86cae1a1b86245738ec68bfa7e6 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sun, 12 Jun 2022 17:19:18 +0200 Subject: [PATCH 1/2] build: pin rebar3_hex plugin version 7.0.2 --- rebar.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebar.config b/rebar.config index 359c294fd..ffeb23da1 100644 --- a/rebar.config +++ b/rebar.config @@ -84,4 +84,4 @@ emqx_exproto_pb % generated code for protobuf ]}. -{project_plugins, [erlfmt]}. +{project_plugins, [erlfmt, {rebar3_hex, "7.0.2"}]}. From 2e6af5f2e1e1cf4a816e79bf15123297ff531810 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sun, 12 Jun 2022 20:18:13 +0200 Subject: [PATCH 2/2] test: fix a flaky test emqtt client may start before listener is ready --- apps/emqx/test/emqx_trace_SUITE.erl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/emqx/test/emqx_trace_SUITE.erl b/apps/emqx/test/emqx_trace_SUITE.erl index d2d07f53b..76e8606fd 100644 --- a/apps/emqx/test/emqx_trace_SUITE.erl +++ b/apps/emqx/test/emqx_trace_SUITE.erl @@ -22,6 +22,7 @@ -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -include_lib("emqx/include/emqx.hrl"). +-include_lib("snabbkaffe/include/snabbkaffe.hrl"). -record(emqx_trace, {name, type, filter, enable = true, start_at, end_at}). @@ -33,7 +34,19 @@ all() -> emqx_common_test_helpers:all(?MODULE). init_per_suite(Config) -> - emqx_common_test_helpers:start_apps([]), + %% ensure dependent apps stopped + emqx_common_test_helpers:stop_apps([]), + ?check_trace( + ?wait_async_action( + emqx_common_test_helpers:start_apps([]), + #{?snk_kind := listener_started, bind := 1883}, + timer:seconds(10) + ), + fun(Trace) -> + %% more than one listener + ?assertMatch([_ | _], ?of_kind(listener_started, Trace)) + end + ), Config. end_per_suite(_Config) ->