fix: set retry interval to 1s in test cases

This commit is contained in:
Shawn 2022-06-14 10:34:33 +08:00
parent f4f263f91e
commit c72a0c386f
2 changed files with 2 additions and 1 deletions

View File

@ -547,7 +547,7 @@ commit_status_trans(Operator, TnxId) ->
mnesia:select(?CLUSTER_COMMIT, [{MatchHead, [Guard], [Result]}]). mnesia:select(?CLUSTER_COMMIT, [{MatchHead, [Guard], [Result]}]).
get_retry_ms() -> 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) when TnxId < 0 -> ok;
maybe_init_tnx_id(Node, TnxId) -> maybe_init_tnx_id(Node, TnxId) ->

View File

@ -44,6 +44,7 @@ init_per_suite(Config) ->
application:load(emqx_conf), application:load(emqx_conf),
ok = ekka:start(), ok = ekka:start(),
ok = mria_rlog:wait_for_shards([?CLUSTER_RPC_SHARD], infinity), 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:new(emqx_alarm, [non_strict, passthrough, no_link]),
meck:expect(emqx_alarm, activate, 3, ok), meck:expect(emqx_alarm, activate, 3, ok),
meck:expect(emqx_alarm, deactivate, 3, ok), meck:expect(emqx_alarm, deactivate, 3, ok),