Re-arrange shovel test suites
* Use more descriptive names * Prefix unit test suites accordingly * Reuse await_credit/1 * await_credit/1 in a flakey test
This commit is contained in:
parent
f25d871d23
commit
30fb9c1128
|
@ -5,7 +5,7 @@
|
|||
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
||||
%%
|
||||
|
||||
-module(dynamic_SUITE).
|
||||
-module(amqp091_dynamic_SUITE).
|
||||
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
-include_lib("amqp_client/include/amqp_client.hrl").
|
|
@ -5,7 +5,7 @@
|
|||
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
||||
%%
|
||||
|
||||
-module(configuration_SUITE).
|
||||
-module(amqp091_static_SUITE).
|
||||
|
||||
-include_lib("common_test/include/ct.hrl").
|
||||
-include_lib("amqp_client/include/amqp_client.hrl").
|
|
@ -11,6 +11,8 @@
|
|||
-include_lib("eunit/include/eunit.hrl").
|
||||
-compile(export_all).
|
||||
|
||||
-import(shovel_test_utils, [await_credit/1]).
|
||||
|
||||
all() ->
|
||||
[
|
||||
{group, non_parallel_tests},
|
||||
|
@ -397,6 +399,7 @@ publish_expect(Session, Source, Dest, Tag, Payload) ->
|
|||
{ok, Sender} = amqp10_client:attach_sender_link(Session, LinkName, Source,
|
||||
unsettled, unsettled_state),
|
||||
ok = await_amqp10_event(link, Sender, attached),
|
||||
await_credit(Sender),
|
||||
publish(Sender, Tag, Payload),
|
||||
amqp10_client:detach_link(Sender),
|
||||
expect_one(Session, Dest).
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
-compile([export_all, nowarn_export_all]).
|
||||
|
||||
-import(rabbit_ct_broker_helpers, [rpc/5]).
|
||||
-import(shovel_test_utils, [await_credit/1]).
|
||||
|
||||
all() ->
|
||||
[
|
||||
|
@ -116,7 +117,7 @@ shovel(Caller, SrcNode, DestNode, ShovelNode, Config) ->
|
|||
{ok, Receiver} = amqp10_client:attach_receiver_link(
|
||||
DestSess, <<"my receiver">>, <<"/amq/queue/", DestQ/binary>>, settled),
|
||||
|
||||
ok = wait_for_credit(Sender),
|
||||
ok = await_credit(Sender),
|
||||
NumMsgs = 20,
|
||||
lists:map(
|
||||
fun(N) ->
|
||||
|
@ -163,15 +164,6 @@ shovel(Caller, SrcNode, DestNode, ShovelNode, Config) ->
|
|||
[ExpectedQueueLen],
|
||||
rpc(Config, ?NEW, ?MODULE, delete_queues, [])).
|
||||
|
||||
wait_for_credit(Sender) ->
|
||||
receive
|
||||
{amqp10_event, {link, Sender, credited}} ->
|
||||
ok
|
||||
after 5000 ->
|
||||
flush(?FUNCTION_NAME),
|
||||
ct:fail(credited_timeout)
|
||||
end.
|
||||
|
||||
receive_messages(Receiver, N) ->
|
||||
receive_messages0(Receiver, N, []).
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
||||
%%
|
||||
|
||||
-module(amqp10_SUITE).
|
||||
-module(amqp10_static_SUITE).
|
||||
|
||||
-include_lib("common_test/include/ct.hrl").
|
||||
-include_lib("eunit/include/eunit.hrl").
|
|
@ -5,7 +5,7 @@
|
|||
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
||||
%%
|
||||
|
||||
-module(local_SUITE).
|
||||
-module(local_static_SUITE).
|
||||
|
||||
-include_lib("amqp_client/include/amqp_client.hrl").
|
||||
-include_lib("common_test/include/ct.hrl").
|
|
@ -5,7 +5,7 @@
|
|||
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
||||
%%
|
||||
|
||||
-module(config_SUITE).
|
||||
-module(unit_parsing_and_validation_SUITE).
|
||||
|
||||
-compile(export_all).
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
||||
%%
|
||||
|
||||
-module(parameters_SUITE).
|
||||
-module(unit_runtime_parameter_SUITE).
|
||||
|
||||
-compile(export_all).
|
||||
|
Loading…
Reference in New Issue