Skip to content

Commit

Permalink
Merge branch 'main' into rabbitmq-server-12412
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin authored Oct 25, 2024
2 parents 1e18716 + 8b79ac7 commit ea24887
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 67 deletions.
50 changes: 15 additions & 35 deletions deps/rabbit/test/amqp_client_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,15 @@ init_per_testcase(T, Config)
when T =:= detach_requeues_one_session_quorum_queue orelse
T =:= single_active_consumer_quorum_queue orelse
T =:= detach_requeues_two_connections_quorum_queue ->
case rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0') of
ok ->
rabbit_ct_helpers:testcase_started(Config, T);
{skip, _} ->
{skip, "Feature flag rabbitmq_4.0.0 enables the consumer removal API"}
end;
%% Feature flag rabbitmq_4.0.0 enables the consumer removal API.
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0'),
rabbit_ct_helpers:testcase_started(Config, T);
init_per_testcase(T, Config)
when T =:= leader_transfer_quorum_queue_credit_single orelse
T =:= leader_transfer_quorum_queue_credit_batches ->
%% These test cases flake with feature flag 'rabbitmq_4.0.0' disabled.
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0'),
rabbit_ct_helpers:testcase_started(Config, T);
init_per_testcase(T = immutable_bare_message, Config) ->
case rpc(Config, rabbit_feature_flags, is_enabled, ['rabbitmq_4.0.0']) of
true ->
Expand All @@ -333,26 +336,6 @@ init_per_testcase(T = dead_letter_reject, Config) ->
{skip, "This test is known to fail with feature flag message_containers_deaths_v2 disabled "
"due bug https://github.com/rabbitmq/rabbitmq-server/issues/11159"}
end;
init_per_testcase(T, Config)
when T =:= leader_transfer_quorum_queue_credit_single orelse
T =:= leader_transfer_quorum_queue_credit_batches orelse
T =:= leader_transfer_stream_credit_single orelse
T =:= leader_transfer_stream_credit_batches orelse
T =:= leader_transfer_quorum_queue_send orelse
T =:= leader_transfer_stream_send ->
case rpc(Config, rabbit_feature_flags, is_supported, ['rabbitmq_4.0.0']) of
true ->
rabbit_ct_helpers:testcase_started(Config, T);
false ->
{skip, "This test requires the AMQP management extension of RabbitMQ 4.0"}
end;
init_per_testcase(T, Config)
when T =:= classic_queue_on_new_node orelse
T =:= quorum_queue_on_new_node ->
%% If node 1 runs 4.x, this is the new no-op plugin.
%% If node 1 runs 3.x, this is the old real plugin.
ok = rabbit_ct_broker_helpers:enable_plugin(Config, 1, rabbitmq_amqp1_0),
rabbit_ct_helpers:testcase_started(Config, T);
init_per_testcase(Testcase, Config) ->
rabbit_ct_helpers:testcase_started(Config, Testcase).

Expand Down Expand Up @@ -3543,14 +3526,11 @@ async_notify_settled_stream(Config) ->
async_notify(settled, <<"stream">>, Config).

async_notify_unsettled_classic_queue(Config) ->
case rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0') of
ok ->
async_notify(unsettled, <<"classic">>, Config);
{skip, _} ->
{skip, "Skipping as this test will flake. Link flow control in classic "
"queues with credit API v1 is known to be broken: "
"https://github.com/rabbitmq/rabbitmq-server/issues/2597"}
end.
%% This test flakes with feature flag 'rabbitmq_4.0.0' disabled.
%% Link flow control in classic queues with credit API v1 is known to be broken:
%% https://github.com/rabbitmq/rabbitmq-server/issues/2597
ok = rabbit_ct_broker_helpers:enable_feature_flag(Config, 'rabbitmq_4.0.0'),
async_notify(unsettled, <<"classic">>, Config).

async_notify_unsettled_quorum_queue(Config) ->
async_notify(unsettled, <<"quorum">>, Config).
Expand Down Expand Up @@ -3852,7 +3832,6 @@ leader_transfer_credit(QName, QType, Credit, Config) ->
ok = end_session_sync(Session1),
ok = close_connection_sync(Connection1),

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

%% Consume from a follower.
ok = wait_for_local_member(QType, QName, Config),
Filter = consume_from_first(QType),
{ok, Receiver} = amqp10_client:attach_receiver_link(
Expand Down
13 changes: 0 additions & 13 deletions deps/rabbit/test/amqp_system_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ groups() ->
routing,
invalid_routes,
auth_failure,
access_failure,
access_failure_not_allowed,
access_failure_send,
streams
Expand Down Expand Up @@ -217,18 +216,6 @@ invalid_routes(Config) ->
auth_failure(Config) ->
run(Config, [ {dotnet, "auth_failure"} ]).

access_failure(Config) ->
User = atom_to_binary(?FUNCTION_NAME),
ok = rabbit_ct_broker_helpers:add_user(Config, User, <<"boo">>),
ok = rabbit_ct_broker_helpers:set_permissions(Config, User, <<"/">>,
<<".*">>, %% configure
<<"^banana.*">>, %% write
<<"^banana.*">> %% read
),
run(Config, [ {dotnet, "access_failure"} ]),
ok = rabbit_ct_broker_helpers:delete_user(Config, User).


access_failure_not_allowed(Config) ->
User = atom_to_binary(?FUNCTION_NAME),
ok = rabbit_ct_broker_helpers:add_user(Config, User, <<"boo">>),
Expand Down
17 changes: 0 additions & 17 deletions deps/rabbit/test/amqp_system_SUITE_data/fsharp-tests/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -466,20 +466,6 @@ module Test =
printfn "Exception %A" ex
()

let accessFailure uri =
try
let u = Uri uri
let uri = sprintf "amqp://access_failure:boo@%s:%i" u.Host u.Port
use ac = connect uri
let src = "/queues/test"
let receiver = ReceiverLink(ac.Session, "test-receiver", src)
receiver.Close()
failwith "expected exception not received"
with
| :? Amqp.AmqpException as ex ->
printfn "Exception %A" ex
()

let accessFailureNotAllowed uri =
try
let u = Uri uri
Expand All @@ -505,9 +491,6 @@ let main argv =
| [AsLower "auth_failure"; uri] ->
authFailure uri
0
| [AsLower "access_failure"; uri] ->
accessFailure uri
0
| [AsLower "access_failure_not_allowed"; uri] ->
accessFailureNotAllowed uri
0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
<version>3.3.5</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
<version>3.3.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand Down

0 comments on commit ea24887

Please sign in to comment.