test(dsraft): start `t_replication_transfers_snapshots` from stable state

This commit is contained in:
Andrew Mayorov 2024-07-17 20:01:55 +02:00
parent 466fa41ec3
commit 2e89656a90
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 3 additions and 9 deletions

View File

@ -130,15 +130,8 @@ t_replication_transfers_snapshots(Config) ->
begin begin
%% Initialize DB on all nodes and wait for it to be online. %% Initialize DB on all nodes and wait for it to be online.
Opts = opts(Config, #{n_shards => 1, n_sites => 3}), Opts = opts(Config, #{n_shards => 1, n_sites => 3}),
?assertEqual( assert_db_open(Nodes, ?DB, Opts),
[{ok, ok} || _ <- Nodes], assert_db_stable(Nodes, ?DB),
erpc:multicall(Nodes, emqx_ds, open_db, [?DB, Opts])
),
?retry(
500,
10,
?assertMatch([[_], [_], [_]], [shards_online(N, ?DB) || N <- Nodes])
),
%% Stop the DB on the "offline" node. %% Stop the DB on the "offline" node.
?wait_async_action( ?wait_async_action(
@ -476,6 +469,7 @@ t_rebalance_chaotic_converges(Config) ->
%% Wait until the LTS timestamp is updated: %% Wait until the LTS timestamp is updated:
timer:sleep(5000), timer:sleep(5000),
assert_db_stable(Nodes, ?DB),
%% Check that all messages are still there. %% Check that all messages are still there.
emqx_ds_test_helpers:verify_stream_effects(?DB, ?FUNCTION_NAME, Nodes, TopicStreams) emqx_ds_test_helpers:verify_stream_effects(?DB, ?FUNCTION_NAME, Nodes, TopicStreams)