Skip to content

Commit c05b3ef

Browse files
Wait until clear cache command is run
in all nodes
1 parent 4ebd13c commit c05b3ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deps/rabbitmq_auth_backend_cache/test/rabbit_auth_clear_cache_command_SUITE.erl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ clear_cache(Config) ->
8585

8686
[ ok = ensure_cache_entries(Config, Node, {F, A}) || Node <- Nodes],
8787
?CLEAR_CACHE_CMD:run([], #{node => lists:last(Nodes)}),
88-
[ {error, not_found} = has_cache_entry(Config, Node, {F, A}) || Node <- Nodes].
88+
[ rabbit_ct_helpers:await_condition_with_retries(fun () ->
89+
case has_cache_entry(Config, Node, {F, A}) of
90+
{error, not_found} -> true;
91+
_ -> false
92+
end
93+
end, 5) || Node <- Nodes].
8994

9095
ensure_cache_entries(Config, Nodename, {F, A}) ->
9196
{ok, AuthRespOk} = rpc(Config, Nodename, rabbit_auth_backend_internal, F, A),

0 commit comments

Comments
 (0)