From c72a0c386ff2f6fe8ca033f9316539d63c26f2c4 Mon Sep 17 00:00:00 2001 From: Shawn <506895667@qq.com> Date: Tue, 14 Jun 2022 10:34:33 +0800 Subject: [PATCH] fix: set retry interval to 1s in test cases --- apps/emqx_conf/src/emqx_cluster_rpc.erl | 2 +- apps/emqx_conf/test/emqx_cluster_rpc_SUITE.erl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/emqx_conf/src/emqx_cluster_rpc.erl b/apps/emqx_conf/src/emqx_cluster_rpc.erl index 720eb4cc5..d6a5e6044 100644 --- a/apps/emqx_conf/src/emqx_cluster_rpc.erl +++ b/apps/emqx_conf/src/emqx_cluster_rpc.erl @@ -547,7 +547,7 @@ commit_status_trans(Operator, TnxId) -> mnesia:select(?CLUSTER_COMMIT, [{MatchHead, [Guard], [Result]}]). get_retry_ms() -> - emqx_conf:get(["node", "cluster_call", "retry_interval"], timer:minutes(1)). + emqx_conf:get([node, cluster_call, retry_interval], timer:minutes(1)). maybe_init_tnx_id(_Node, TnxId) when TnxId < 0 -> ok; maybe_init_tnx_id(Node, TnxId) -> diff --git a/apps/emqx_conf/test/emqx_cluster_rpc_SUITE.erl b/apps/emqx_conf/test/emqx_cluster_rpc_SUITE.erl index 48fd91a33..51d1a1cde 100644 --- a/apps/emqx_conf/test/emqx_cluster_rpc_SUITE.erl +++ b/apps/emqx_conf/test/emqx_cluster_rpc_SUITE.erl @@ -44,6 +44,7 @@ init_per_suite(Config) -> application:load(emqx_conf), ok = ekka:start(), ok = mria_rlog:wait_for_shards([?CLUSTER_RPC_SHARD], infinity), + ok = emqx_config:put([node, cluster_call, retry_interval], 1000), meck:new(emqx_alarm, [non_strict, passthrough, no_link]), meck:expect(emqx_alarm, activate, 3, ok), meck:expect(emqx_alarm, deactivate, 3, ok),