From 9d9e991f30cf1bd0004b847947a55682dda2557e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chrz=C4=85szcz?= Date: Fri, 7 Aug 2026 17:23:24 +0200 Subject: [PATCH] Wait until there is no pause because unpausing is async --- test/cets_join_SUITE.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/cets_join_SUITE.erl b/test/cets_join_SUITE.erl index 29f491c..a095edf 100644 --- a/test/cets_join_SUITE.erl +++ b/test/cets_join_SUITE.erl @@ -635,8 +635,11 @@ join_on_many_nodes_concurrently_with_the_same_lock(Config) -> ], %% The last committed join stamped the same join_ref everywhere ?assertMatch([_], lists:usort([Info || #{join_ref := Info} <- CetsInfos])), - %% No pause left behind - [?assertMatch(#{pause_monitors := []}, Info) || Info <- CetsInfos], + %% Wait until there is no pause left behind + [ + cets_test_wait:wait_until(fun() -> maps:get(pause_monitors, cets:info(Pid)) end, []) + || Pid <- AllCetsPids + ], %% Data from all nodes is merged into every replica ExpectedRows = lists:sort([{ct1} | [{PeerId} || PeerId <- peer_ids()]]), [?assertEqual({ok, ExpectedRows}, cets:remote_dump(Pid)) || Pid <- AllCetsPids].