Skip to content

Commit 63f4405

Browse files
committed
Test: Increase receive timeout in all rabbit test suites
1 parent bd27c3c commit 63f4405

33 files changed

+248
-229
lines changed

deps/rabbit/test/amqp_address_SUITE.erl

+11-9
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
[flush/1,
2323
wait_for_credit/1]).
2424

25+
-define(TIMEOUT, 30_000).
26+
2527
all() ->
2628
[
2729
{group, v1_permitted},
@@ -216,7 +218,7 @@ target_exchange_absent(Config) ->
216218
condition = ?V_1_0_AMQP_ERROR_NOT_FOUND,
217219
description = {utf8, <<"no exchange '", XName:(byte_size(XName))/binary,
218220
"' in vhost '/'">>}}}}} -> ok
219-
after 5000 ->
221+
after ?TIMEOUT ->
220222
Reason = {missing_event, ?LINE},
221223
flush(Reason),
222224
ct:fail(Reason)
@@ -275,7 +277,7 @@ target_queue_absent(Config) ->
275277
condition = ?V_1_0_AMQP_ERROR_NOT_FOUND,
276278
description = {utf8, <<"no queue '", QName:(byte_size(QName))/binary,
277279
"' in vhost '/'">>}}}}} -> ok
278-
after 5000 ->
280+
after ?TIMEOUT ->
279281
Reason = {missing_event, ?LINE},
280282
flush(Reason),
281283
ct:fail(Reason)
@@ -403,7 +405,7 @@ target_per_message_unset_to_address(Config) ->
403405

404406
ok = amqp10_client:detach_link(Sender),
405407
receive {amqp10_event, {link, Sender, {detached, normal}}} -> ok
406-
after 5000 -> ct:fail({missing_event, ?LINE})
408+
after ?TIMEOUT -> ct:fail({missing_event, ?LINE})
407409
end,
408410
ok = amqp10_client:end_session(Session),
409411
ok = amqp10_client:close_connection(Connection).
@@ -467,7 +469,7 @@ target_per_message_bad_to_address(Config) ->
467469
?assertMatch(#'v1_0.error'{condition = ?V_1_0_AMQP_ERROR_PRECONDITION_FAILED,
468470
description = {utf8, <<"bad 'to' address", _Rest/binary>>}},
469471
Error)
470-
after 5000 ->
472+
after ?TIMEOUT ->
471473
flush(missing_disposition),
472474
ct:fail(missing_disposition)
473475
end
@@ -507,7 +509,7 @@ target_per_message_exchange_absent_settled(Config) ->
507509
info = {map, [{{symbol, <<"delivery-tag">>}, {binary, DTag2}}]}
508510
},
509511
Error)
510-
after 5000 -> ct:fail("server did not close our outgoing link")
512+
after ?TIMEOUT -> ct:fail("server did not close our outgoing link")
511513
end,
512514

513515
ok = cleanup(Init).
@@ -566,7 +568,7 @@ target_bad_address0(TargetAddress, Config) ->
566568
{session, Session,
567569
{ended,
568570
#'v1_0.error'{condition = ?V_1_0_AMQP_ERROR_INVALID_FIELD}}}} -> ok
569-
after 5000 ->
571+
after ?TIMEOUT ->
570572
Reason = {missing_event, ?LINE, TargetAddress},
571573
flush(Reason),
572574
ct:fail(Reason)
@@ -593,7 +595,7 @@ source_queue_absent(Config) ->
593595
condition = ?V_1_0_AMQP_ERROR_NOT_FOUND,
594596
description = {utf8, <<"no queue '", QName:(byte_size(QName))/binary,
595597
"' in vhost '/'">>}}}}} -> ok
596-
after 5000 ->
598+
after ?TIMEOUT ->
597599
Reason = {missing_event, ?LINE},
598600
flush(Reason),
599601
ct:fail(Reason)
@@ -626,7 +628,7 @@ source_bad_address0(SourceAddress, Config) ->
626628
{session, Session,
627629
{ended,
628630
#'v1_0.error'{condition = ?V_1_0_AMQP_ERROR_INVALID_FIELD}}}} -> ok
629-
after 5000 ->
631+
after ?TIMEOUT ->
630632
Reason = {missing_event, ?LINE},
631633
flush(Reason),
632634
ct:fail(Reason)
@@ -657,7 +659,7 @@ wait_for_settled(State, Tag) ->
657659
receive
658660
{amqp10_disposition, {State, Tag}} ->
659661
ok
660-
after 5000 ->
662+
after ?TIMEOUT ->
661663
Reason = {?FUNCTION_NAME, State, Tag},
662664
flush(Reason),
663665
ct:fail(Reason)

0 commit comments

Comments
 (0)