test(ds): Add generation in the replication suite
This commit is contained in:
parent
9f7ef9f34f
commit
3da3a36863
|
@ -181,6 +181,13 @@ t_rebalance(Config) ->
|
||||||
%% Now join the rest of the sites:
|
%% Now join the rest of the sites:
|
||||||
{N2, assign_db_sites, 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(
|
Stream = emqx_utils_stream:interleave(
|
||||||
[
|
[
|
||||||
{50, Stream0},
|
{50, Stream0},
|
||||||
|
|
|
@ -156,8 +156,8 @@ apply_stream(DB, NodeStream0, Stream0, N) ->
|
||||||
apply_stream(DB, NodeStream, Stream, N + 1);
|
apply_stream(DB, NodeStream, Stream, N + 1);
|
||||||
[add_generation | Stream] ->
|
[add_generation | Stream] ->
|
||||||
%% FIXME:
|
%% FIXME:
|
||||||
[_Node | NodeStream] = emqx_utils_stream:next(NodeStream0),
|
[Node | NodeStream] = emqx_utils_stream:next(NodeStream0),
|
||||||
%% add_generation(Node, DB),
|
?ON(Node, emqx_ds:add_generation(DB)),
|
||||||
apply_stream(DB, NodeStream, Stream, N);
|
apply_stream(DB, NodeStream, Stream, N);
|
||||||
[{Node, Operation, Arg} | Stream] when
|
[{Node, Operation, Arg} | Stream] when
|
||||||
Operation =:= join_db_site; Operation =:= leave_db_site; Operation =:= assign_db_sites
|
Operation =:= join_db_site; Operation =:= leave_db_site; Operation =:= assign_db_sites
|
||||||
|
|
Loading…
Reference in New Issue