Skip to content

Commit 730787b

Browse files
dcorbachomergify[bot]
authored andcommitted
Test: Increase receive timeout in all rabbit test suites
(cherry picked from commit fe7a141) # Conflicts: # deps/rabbit/test/amqp_utils.erl # deps/rabbit/test/msg_size_metrics_SUITE.erl # deps/rabbit/test/topic_permission_SUITE.erl
1 parent 19e3f21 commit 730787b

33 files changed

+618
-213
lines changed

deps/rabbit/test/amqp_address_SUITE.erl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
-import(rabbit_ct_helpers,
2020
[eventually/1]).
2121

22+
-define(TIMEOUT, 30_000).
23+
2224
all() ->
2325
[
2426
{group, v1_permitted},
@@ -213,7 +215,7 @@ target_exchange_absent(Config) ->
213215
condition = ?V_1_0_AMQP_ERROR_NOT_FOUND,
214216
description = {utf8, <<"no exchange '", XName:(byte_size(XName))/binary,
215217
"' in vhost '/'">>}}}}} -> ok
216-
after 5000 ->
218+
after ?TIMEOUT ->
217219
Reason = {missing_event, ?LINE},
218220
flush(Reason),
219221
ct:fail(Reason)
@@ -272,7 +274,7 @@ target_queue_absent(Config) ->
272274
condition = ?V_1_0_AMQP_ERROR_NOT_FOUND,
273275
description = {utf8, <<"no queue '", QName:(byte_size(QName))/binary,
274276
"' in vhost '/'">>}}}}} -> ok
275-
after 5000 ->
277+
after ?TIMEOUT ->
276278
Reason = {missing_event, ?LINE},
277279
flush(Reason),
278280
ct:fail(Reason)
@@ -401,7 +403,7 @@ target_per_message_unset_to_address(Config) ->
401403

402404
ok = amqp10_client:detach_link(Sender),
403405
receive {amqp10_event, {link, Sender, {detached, normal}}} -> ok
404-
after 5000 -> ct:fail({missing_event, ?LINE})
406+
after ?TIMEOUT -> ct:fail({missing_event, ?LINE})
405407
end,
406408
ok = amqp10_client:end_session(Session),
407409
ok = amqp10_client:close_connection(Connection).
@@ -465,7 +467,7 @@ target_per_message_bad_to_address(Config) ->
465467
?assertMatch(#'v1_0.error'{condition = ?V_1_0_AMQP_ERROR_PRECONDITION_FAILED,
466468
description = {utf8, <<"bad 'to' address", _Rest/binary>>}},
467469
Error)
468-
after 5000 ->
470+
after ?TIMEOUT ->
469471
flush(missing_disposition),
470472
ct:fail(missing_disposition)
471473
end
@@ -505,7 +507,7 @@ target_per_message_exchange_absent_settled(Config) ->
505507
info = {map, [{{symbol, <<"delivery-tag">>}, {binary, DTag2}}]}
506508
},
507509
Error)
508-
after 5000 -> ct:fail("server did not close our outgoing link")
510+
after ?TIMEOUT -> ct:fail("server did not close our outgoing link")
509511
end,
510512

511513
ok = cleanup(Init).
@@ -564,7 +566,7 @@ target_bad_address0(TargetAddress, Config) ->
564566
{session, Session,
565567
{ended,
566568
#'v1_0.error'{condition = ?V_1_0_AMQP_ERROR_INVALID_FIELD}}}} -> ok
567-
after 5000 ->
569+
after ?TIMEOUT ->
568570
Reason = {missing_event, ?LINE, TargetAddress},
569571
flush(Reason),
570572
ct:fail(Reason)
@@ -591,7 +593,7 @@ source_queue_absent(Config) ->
591593
condition = ?V_1_0_AMQP_ERROR_NOT_FOUND,
592594
description = {utf8, <<"no queue '", QName:(byte_size(QName))/binary,
593595
"' in vhost '/'">>}}}}} -> ok
594-
after 5000 ->
596+
after ?TIMEOUT ->
595597
Reason = {missing_event, ?LINE},
596598
flush(Reason),
597599
ct:fail(Reason)
@@ -624,7 +626,7 @@ source_bad_address0(SourceAddress, Config) ->
624626
{session, Session,
625627
{ended,
626628
#'v1_0.error'{condition = ?V_1_0_AMQP_ERROR_INVALID_FIELD}}}} -> ok
627-
after 5000 ->
629+
after ?TIMEOUT ->
628630
Reason = {missing_event, ?LINE},
629631
flush(Reason),
630632
ct:fail(Reason)
@@ -666,7 +668,7 @@ wait_for_settled(State, Tag) ->
666668
receive
667669
{amqp10_disposition, {State, Tag}} ->
668670
ok
669-
after 5000 ->
671+
after ?TIMEOUT ->
670672
Reason = {?FUNCTION_NAME, State, Tag},
671673
flush(Reason),
672674
ct:fail(Reason)

0 commit comments

Comments
 (0)