test(ds): fix inter-suite flakiness
Attempt to mitigate this frequent source of flakiness: ``` =CRASH REPORT==== 31-Jan-2024::17:30:15.025404 === crasher: initial call: emqx_ds_replication_layer_egress:init/1 pid: <0.11312.0> registered_name: [] exception error: no match of right hand side value {error, no_leader_for_shard} in function emqx_ds_replication_layer_egress:init/1 (/emqx/apps/emqx_durable_storage/src/emqx_ds_replication_layer_egress.erl, line 93) in call from gen_server:init_it/2 (gen_server.erl, line 980) in call from gen_server:init_it/6 (gen_server.erl, line 935) ancestors: [<0.11310.0>,<0.11304.0>,emqx_ds_builtin_databases_sup, emqx_ds_builtin_sup,emqx_ds_sup,<0.11236.0>] message_queue_len: 0 messages: [] links: [<0.11310.0>] dictionary: [] trap_exit: true status: running heap_size: 376 stack_size: 28 reductions: 231 neighbours: ```
This commit is contained in:
parent
d51deac222
commit
f7b12470dd
|
@ -406,11 +406,16 @@ all() -> emqx_common_test_helpers:all(?MODULE).
|
||||||
suite() -> [{timetrap, {seconds, 20}}].
|
suite() -> [{timetrap, {seconds, 20}}].
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
{ok, _} = application:ensure_all_started(emqx_durable_storage),
|
Apps = emqx_cth_suite:start(
|
||||||
Config.
|
[emqx_durable_storage],
|
||||||
|
#{work_dir => emqx_cth_suite:work_dir(Config)}
|
||||||
|
),
|
||||||
|
[{apps, Apps} | Config].
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(Config) ->
|
||||||
ok = application:stop(emqx_durable_storage).
|
Apps = ?config(apps, Config),
|
||||||
|
ok = emqx_cth_suite:stop(Apps),
|
||||||
|
ok.
|
||||||
|
|
||||||
init_per_testcase(TC, Config) ->
|
init_per_testcase(TC, Config) ->
|
||||||
ok = emqx_ds:open_db(TC, ?DEFAULT_CONFIG),
|
ok = emqx_ds:open_db(TC, ?DEFAULT_CONFIG),
|
||||||
|
|
Loading…
Reference in New Issue