Reduce flakiness in rabbitmq_queues_cli_integration_SUITE

In case removed node hosts a leader, it takes a moment for
the QQ to elect a new one and begin accepting cluster
membership change operations again.

(cherry picked from commit a9d8816c6a)
This commit is contained in:
Michael Klishin 2021-06-21 14:39:05 +08:00
parent 8ec3b08462
commit 6550cd1752
No known key found for this signature in database
GPG Key ID: E80EDCFA0CDB21EE
1 changed files with 3 additions and 0 deletions

View File

@ -77,10 +77,12 @@ shrink(Config) ->
publish_confirm(Ch, QName),
{ok, Out1} = rabbitmq_queues(Config, 0, ["shrink", Nodename2]),
?assertMatch(#{{"/", "shrink1"} := {2, ok}}, parse_result(Out1)),
timer:sleep(1500),
Nodename1 = rabbit_ct_broker_helpers:get_node_config(Config, 1, nodename),
publish_confirm(Ch, QName),
{ok, Out2} = rabbitmq_queues(Config, 0, ["shrink", Nodename1]),
?assertMatch(#{{"/", "shrink1"} := {1, ok}}, parse_result(Out2)),
timer:sleep(1500),
Nodename0 = rabbit_ct_broker_helpers:get_node_config(Config, 0, nodename),
publish_confirm(Ch, QName),
{ok, Out3} = rabbitmq_queues(Config, 0, ["shrink", Nodename0]),
@ -100,6 +102,7 @@ grow(Config) ->
publish_confirm(Ch, QName),
{ok, Out1} = rabbitmq_queues(Config, 0, ["grow", Nodename0, "all"]),
?assertMatch(#{{"/", "grow1"} := {2, ok}}, parse_result(Out1)),
timer:sleep(500),
Nodename1 = rabbit_ct_broker_helpers:get_node_config(Config, 1, nodename),
publish_confirm(Ch, QName),
{ok, Out2} = rabbitmq_queues(Config, 0, ["grow", Nodename1, "all"]),