test(ds): Add generation in the replication suite

This commit is contained in:
ieQu1 2024-05-13 19:51:04 +02:00
parent 9f7ef9f34f
commit 3da3a36863
No known key found for this signature in database
GPG Key ID: 488654DF3FED6FDE
2 changed files with 9 additions and 2 deletions

View File

@ -181,6 +181,13 @@ t_rebalance(Config) ->
%% Now join the rest of the sites:
{N2, assign_db_sites, Sites}
],
Stream1 = emqx_utils_stream:interleave(
[
{50, Stream0},
emqx_utils_stream:const(add_generation)
],
false
),
Stream = emqx_utils_stream:interleave(
[
{50, Stream0},

View File

@ -156,8 +156,8 @@ apply_stream(DB, NodeStream0, Stream0, N) ->
apply_stream(DB, NodeStream, Stream, N + 1);
[add_generation | Stream] ->
%% FIXME:
[_Node | NodeStream] = emqx_utils_stream:next(NodeStream0),
%% add_generation(Node, DB),
[Node | NodeStream] = emqx_utils_stream:next(NodeStream0),
?ON(Node, emqx_ds:add_generation(DB)),
apply_stream(DB, NodeStream, Stream, N);
[{Node, Operation, Arg} | Stream] when
Operation =:= join_db_site; Operation =:= leave_db_site; Operation =:= assign_db_sites