From 6259f95aab5292250d21b47a65716f3744ebc59c Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Mon, 25 Mar 2024 14:36:22 -0300 Subject: [PATCH] test: attempt to fix flaky test ``` expected: {ok,<<...>>} got: {error,enoent} line: 187 comment: #{node => 'emqx_conf_app_SUITE9@127.0.0.1'} ``` --- apps/emqx_conf/test/emqx_conf_app_SUITE.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/emqx_conf/test/emqx_conf_app_SUITE.erl b/apps/emqx_conf/test/emqx_conf_app_SUITE.erl index 9687e337d..4b872abdf 100644 --- a/apps/emqx_conf/test/emqx_conf_app_SUITE.erl +++ b/apps/emqx_conf/test/emqx_conf_app_SUITE.erl @@ -21,6 +21,7 @@ -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). +-include_lib("snabbkaffe/include/snabbkaffe.hrl"). all() -> emqx_common_test_helpers:all(?MODULE). @@ -75,7 +76,7 @@ t_copy_new_data_dir(Config) -> {[ok, ok, ok], []} = rpc:multicall(Nodes, ?MODULE, set_data_dir_env, []), ok = rpc:call(First, application, start, [emqx_conf]), {[ok, ok], []} = rpc:multicall(Rest, application, start, [emqx_conf]), - ok = assert_data_copy_done(Nodes, File) + ?retry(200, 10, ok = assert_data_copy_done(Nodes, File)) after stop_cluster(Nodes) end. @@ -100,7 +101,7 @@ t_copy_deprecated_data_dir(Config) -> {[ok, ok, ok], []} = rpc:multicall(Nodes, ?MODULE, set_data_dir_env, []), ok = rpc:call(First, application, start, [emqx_conf]), {[ok, ok], []} = rpc:multicall(Rest, application, start, [emqx_conf]), - ok = assert_data_copy_done(Nodes, File) + ?retry(200, 10, ok = assert_data_copy_done(Nodes, File)) after stop_cluster(Nodes) end.