test(dsrepl): anticipate transitionless membership changes

E.g. when a membership change is applied twice in a row.
This commit is contained in:
Andrew Mayorov 2024-06-13 18:32:57 +02:00
parent 19072414cb
commit 8538a5a5b6
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 6 additions and 1 deletions

View File

@ -207,7 +207,12 @@ apply_stream(DB, NodeStream0, Stream0, N) ->
%% Give some time for at least one transition to complete.
Transitions = transitions(Node, DB),
ct:pal("Transitions after ~p: ~p", [Operation, Transitions]),
?retry(200, 10, ?assertNotEqual(Transitions, transitions(Node, DB))),
case Transitions of
[_ | _] ->
?retry(200, 10, ?assertNotEqual(Transitions, transitions(Node, DB)));
[] ->
ok
end,
apply_stream(DB, NodeStream0, Stream, N);
[Fun | Stream] when is_function(Fun) ->
Fun(),