Skip to content

Commit c476540

Browse files
committed
Remove test flake
Prior to this commit tests * leader_transfer_quorum_queue_credit_single * leader_transfer_quorum_queue_credit_batches flaked in CI during 4.1 (main) and 4.0 mixed version testing. The follwing error occurred on node 0: ``` [error] <0.1950.0> Timed out waiting for credit reply from quorum queue 'leader_transfer_quorum_queue_credit_batches' in vhost '/'. Hint: Enable feature flag rabbitmq_4.0.0 [warning] <0.1950.0> Closing session for connection <0.1945.0>: {'v1_0.error', [warning] <0.1950.0> {symbol,<<"amqp:internal-error">>}, [warning] <0.1950.0> {utf8, [warning] <0.1950.0> <<"Timed out waiting for credit reply from quorum queue 'leader_transfer_quorum_queue_credit_batches' in vhost '/'. Hint: Enable feature flag rabbitmq_4.0.0">>}, [warning] <0.1950.0> undefined} ``` Therefore we enable this feature flag for both tests. This commit also simplifies some test setups that were necessary for 4.0/3.13 mixed version testing, but isn't necessary anymore for 4.1/4.0 mixed version testing.
1 parent 2c0cdee commit c476540

File tree

1 file changed

+15
-35
lines changed

1 file changed

+15
-35
lines changed

deps/rabbit/test/amqp_client_SUITE.erl

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,15 @@ init_per_testcase(T, Config)
303303
when T =:= detach_requeues_one_session_quorum_queue orelse
304304
T =:= single_active_consumer_quorum_queue orelse
305305
T =:= detach_requeues_two_connections_quorum_queue ->
306-
case rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0') of
307-
ok ->
308-
rabbit_ct_helpers:testcase_started(Config, T);
309-
{skip, _} ->
310-
{skip, "Feature flag rabbitmq_4.0.0 enables the consumer removal API"}
311-
end;
306+
%% Feature flag rabbitmq_4.0.0 enables the consumer removal API.
307+
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0'),
308+
rabbit_ct_helpers:testcase_started(Config, T);
309+
init_per_testcase(T, Config)
310+
when T =:= leader_transfer_quorum_queue_credit_single orelse
311+
T =:= leader_transfer_quorum_queue_credit_batches ->
312+
%% These test cases flake with feature flag 'rabbitmq_4.0.0' disabled.
313+
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0'),
314+
rabbit_ct_helpers:testcase_started(Config, T);
312315
init_per_testcase(T = immutable_bare_message, Config) ->
313316
case rpc(Config, rabbit_feature_flags, is_enabled, ['rabbitmq_4.0.0']) of
314317
true ->
@@ -333,26 +336,6 @@ init_per_testcase(T = dead_letter_reject, Config) ->
333336
{skip, "This test is known to fail with feature flag message_containers_deaths_v2 disabled "
334337
"due bug https://github.com/rabbitmq/rabbitmq-server/issues/11159"}
335338
end;
336-
init_per_testcase(T, Config)
337-
when T =:= leader_transfer_quorum_queue_credit_single orelse
338-
T =:= leader_transfer_quorum_queue_credit_batches orelse
339-
T =:= leader_transfer_stream_credit_single orelse
340-
T =:= leader_transfer_stream_credit_batches orelse
341-
T =:= leader_transfer_quorum_queue_send orelse
342-
T =:= leader_transfer_stream_send ->
343-
case rpc(Config, rabbit_feature_flags, is_supported, ['rabbitmq_4.0.0']) of
344-
true ->
345-
rabbit_ct_helpers:testcase_started(Config, T);
346-
false ->
347-
{skip, "This test requires the AMQP management extension of RabbitMQ 4.0"}
348-
end;
349-
init_per_testcase(T, Config)
350-
when T =:= classic_queue_on_new_node orelse
351-
T =:= quorum_queue_on_new_node ->
352-
%% If node 1 runs 4.x, this is the new no-op plugin.
353-
%% If node 1 runs 3.x, this is the old real plugin.
354-
ok = rabbit_ct_broker_helpers:enable_plugin(Config, 1, rabbitmq_amqp1_0),
355-
rabbit_ct_helpers:testcase_started(Config, T);
356339
init_per_testcase(Testcase, Config) ->
357340
rabbit_ct_helpers:testcase_started(Config, Testcase).
358341

@@ -3543,14 +3526,11 @@ async_notify_settled_stream(Config) ->
35433526
async_notify(settled, <<"stream">>, Config).
35443527

35453528
async_notify_unsettled_classic_queue(Config) ->
3546-
case rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0') of
3547-
ok ->
3548-
async_notify(unsettled, <<"classic">>, Config);
3549-
{skip, _} ->
3550-
{skip, "Skipping as this test will flake. Link flow control in classic "
3551-
"queues with credit API v1 is known to be broken: "
3552-
"https://github.com/rabbitmq/rabbitmq-server/issues/2597"}
3553-
end.
3529+
%% This test flakes with feature flag 'rabbitmq_4.0.0' disabled.
3530+
%% Link flow control in classic queues with credit API v1 is known to be broken:
3531+
%% https://github.com/rabbitmq/rabbitmq-server/issues/2597
3532+
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0'),
3533+
async_notify(unsettled, <<"classic">>, Config).
35543534

35553535
async_notify_unsettled_quorum_queue(Config) ->
35563536
async_notify(unsettled, <<"quorum">>, Config).
@@ -3852,7 +3832,6 @@ leader_transfer_credit(QName, QType, Credit, Config) ->
38523832
ok = end_session_sync(Session1),
38533833
ok = close_connection_sync(Connection1),
38543834

3855-
%% Consume from a follower.
38563835
OpnConf = connection_config(0, Config),
38573836
{ok, Connection0} = amqp10_client:open_connection(OpnConf),
38583837
{ok, Session0} = amqp10_client:begin_session_sync(Connection0),
@@ -3866,6 +3845,7 @@ leader_transfer_credit(QName, QType, Credit, Config) ->
38663845
ok = wait_for_accepts(NumMsgs),
38673846
ok = detach_link_sync(Sender),
38683847

3848+
%% Consume from a follower.
38693849
ok = wait_for_local_member(QType, QName, Config),
38703850
Filter = consume_from_first(QType),
38713851
{ok, Receiver} = amqp10_client:attach_receiver_link(

0 commit comments

Comments
 (0)