22
22
[flush /1 ,
23
23
wait_for_credit /1 ]).
24
24
25
+ -define (TIMEOUT , 30_000 ).
26
+
25
27
all () ->
26
28
[
27
29
{group , v1_permitted },
@@ -216,7 +218,7 @@ target_exchange_absent(Config) ->
216
218
condition = ? V_1_0_AMQP_ERROR_NOT_FOUND ,
217
219
description = {utf8 , <<" no exchange '" , XName :(byte_size (XName ))/binary ,
218
220
" ' in vhost '/'" >>}}}}} -> ok
219
- after 5000 ->
221
+ after ? TIMEOUT ->
220
222
Reason = {missing_event , ? LINE },
221
223
flush (Reason ),
222
224
ct :fail (Reason )
@@ -275,7 +277,7 @@ target_queue_absent(Config) ->
275
277
condition = ? V_1_0_AMQP_ERROR_NOT_FOUND ,
276
278
description = {utf8 , <<" no queue '" , QName :(byte_size (QName ))/binary ,
277
279
" ' in vhost '/'" >>}}}}} -> ok
278
- after 5000 ->
280
+ after ? TIMEOUT ->
279
281
Reason = {missing_event , ? LINE },
280
282
flush (Reason ),
281
283
ct :fail (Reason )
@@ -403,7 +405,7 @@ target_per_message_unset_to_address(Config) ->
403
405
404
406
ok = amqp10_client :detach_link (Sender ),
405
407
receive {amqp10_event , {link , Sender , {detached , normal }}} -> ok
406
- after 5000 -> ct :fail ({missing_event , ? LINE })
408
+ after ? TIMEOUT -> ct :fail ({missing_event , ? LINE })
407
409
end ,
408
410
ok = amqp10_client :end_session (Session ),
409
411
ok = amqp10_client :close_connection (Connection ).
@@ -467,7 +469,7 @@ target_per_message_bad_to_address(Config) ->
467
469
? assertMatch (# 'v1_0.error' {condition = ? V_1_0_AMQP_ERROR_PRECONDITION_FAILED ,
468
470
description = {utf8 , <<" bad 'to' address" , _Rest /binary >>}},
469
471
Error )
470
- after 5000 ->
472
+ after ? TIMEOUT ->
471
473
flush (missing_disposition ),
472
474
ct :fail (missing_disposition )
473
475
end
@@ -507,7 +509,7 @@ target_per_message_exchange_absent_settled(Config) ->
507
509
info = {map , [{{symbol , <<" delivery-tag" >>}, {binary , DTag2 }}]}
508
510
},
509
511
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" )
511
513
end ,
512
514
513
515
ok = cleanup (Init ).
@@ -566,7 +568,7 @@ target_bad_address0(TargetAddress, Config) ->
566
568
{session , Session ,
567
569
{ended ,
568
570
# 'v1_0.error' {condition = ? V_1_0_AMQP_ERROR_INVALID_FIELD }}}} -> ok
569
- after 5000 ->
571
+ after ? TIMEOUT ->
570
572
Reason = {missing_event , ? LINE , TargetAddress },
571
573
flush (Reason ),
572
574
ct :fail (Reason )
@@ -593,7 +595,7 @@ source_queue_absent(Config) ->
593
595
condition = ? V_1_0_AMQP_ERROR_NOT_FOUND ,
594
596
description = {utf8 , <<" no queue '" , QName :(byte_size (QName ))/binary ,
595
597
" ' in vhost '/'" >>}}}}} -> ok
596
- after 5000 ->
598
+ after ? TIMEOUT ->
597
599
Reason = {missing_event , ? LINE },
598
600
flush (Reason ),
599
601
ct :fail (Reason )
@@ -626,7 +628,7 @@ source_bad_address0(SourceAddress, Config) ->
626
628
{session , Session ,
627
629
{ended ,
628
630
# 'v1_0.error' {condition = ? V_1_0_AMQP_ERROR_INVALID_FIELD }}}} -> ok
629
- after 5000 ->
631
+ after ? TIMEOUT ->
630
632
Reason = {missing_event , ? LINE },
631
633
flush (Reason ),
632
634
ct :fail (Reason )
@@ -657,7 +659,7 @@ wait_for_settled(State, Tag) ->
657
659
receive
658
660
{amqp10_disposition , {State , Tag }} ->
659
661
ok
660
- after 5000 ->
662
+ after ? TIMEOUT ->
661
663
Reason = {? FUNCTION_NAME , State , Tag },
662
664
flush (Reason ),
663
665
ct :fail (Reason )
0 commit comments