1616
1717-compile ([export_all , nowarn_export_all ]).
1818
19- -define (TOUT , 30000 ).
19+ -define (TIMEOUT , 30000 ).
2020
2121suite () ->
2222 [{timetrap , {minutes , 4 }}].
@@ -186,7 +186,7 @@ open_close_connection(Config) ->
186186 {ok , Connection2 } = amqp10_client :open_connection (OpnConf ),
187187 receive
188188 {amqp10_event , {connection , Connection2 , opened }} -> ok
189- after ? TOUT -> exit (connection_timeout )
189+ after ? TIMEOUT -> exit (connection_timeout )
190190 end ,
191191 ok = amqp10_client :close_connection (Connection2 ),
192192 ok = amqp10_client :close_connection (Connection ).
@@ -203,7 +203,7 @@ open_connection_plain_sasl(Config) ->
203203 {ok , Connection } = amqp10_client :open_connection (OpnConf ),
204204 receive
205205 {amqp10_event , {connection , Connection , opened }} -> ok
206- after ? TOUT -> exit (connection_timeout )
206+ after ? TIMEOUT -> exit (connection_timeout )
207207 end ,
208208 ok = amqp10_client :close_connection (Connection ).
209209
@@ -227,7 +227,7 @@ open_connection_plain_sasl_parse_uri(Config) ->
227227 {ok , Connection } = amqp10_client :open_connection (OpnConf ),
228228 receive
229229 {amqp10_event , {connection , Connection , opened }} -> ok
230- after ? TOUT -> exit (connection_timeout )
230+ after ? TIMEOUT -> exit (connection_timeout )
231231 end ,
232232 ok = amqp10_client :close_connection (Connection ).
233233
@@ -247,7 +247,7 @@ open_connection_plain_sasl_failure(Config) ->
247247 % some implementation may simply close the tcp_connection
248248 {amqp10_event , {connection , Connection , {closed , shutdown }}} -> ok
249249
250- after ? TOUT ->
250+ after ? TIMEOUT ->
251251 ct :pal (" Connection process is alive? = ~tp~n " ,
252252 [erlang :is_process_alive (Connection )]),
253253 exit (connection_timeout )
@@ -471,27 +471,27 @@ notify_with_performative(Config) ->
471471
472472 {ok , Connection } = amqp10_client :open_connection (OpenConf ),
473473 receive {amqp10_event , {connection , Connection , {opened , # 'v1_0.open' {}}}} -> ok
474- after ? TOUT -> ct :fail ({missing_event , ? LINE })
474+ after ? TIMEOUT -> ct :fail ({missing_event , ? LINE })
475475 end ,
476476
477477 {ok , Session1 } = amqp10_client :begin_session (Connection ),
478478 receive {amqp10_event , {session , Session1 , {begun , # 'v1_0.begin' {}}}} -> ok
479- after ? TOUT -> ct :fail ({missing_event , ? LINE })
479+ after ? TIMEOUT -> ct :fail ({missing_event , ? LINE })
480480 end ,
481481
482482 {ok , Sender1 } = amqp10_client :attach_sender_link (Session1 , <<" sender 1" >>, <<" /exchanges/amq.fanout" >>),
483483 receive {amqp10_event , {link , Sender1 , {attached , # 'v1_0.attach' {}}}} -> ok
484- after ? TOUT -> ct :fail ({missing_event , ? LINE })
484+ after ? TIMEOUT -> ct :fail ({missing_event , ? LINE })
485485 end ,
486486
487487 ok = amqp10_client :detach_link (Sender1 ),
488488 receive {amqp10_event , {link , Sender1 , {detached , # 'v1_0.detach' {}}}} -> ok
489- after ? TOUT -> ct :fail ({missing_event , ? LINE })
489+ after ? TIMEOUT -> ct :fail ({missing_event , ? LINE })
490490 end ,
491491
492492 ok = amqp10_client :end_session (Session1 ),
493493 receive {amqp10_event , {session , Session1 , {ended , # 'v1_0.end' {}}}} -> ok
494- after ? TOUT -> ct :fail ({missing_event , ? LINE })
494+ after ? TIMEOUT -> ct :fail ({missing_event , ? LINE })
495495 end ,
496496
497497 % % Test that the amqp10_client:*_sync functions work.
@@ -503,7 +503,7 @@ notify_with_performative(Config) ->
503503
504504 ok = amqp10_client :close_connection (Connection ),
505505 receive {amqp10_event , {connection , Connection , {closed , # 'v1_0.close' {}}}} -> ok
506- after ? TOUT -> ct :fail ({missing_event , ? LINE })
506+ after ? TIMEOUT -> ct :fail ({missing_event , ? LINE })
507507 end .
508508
509509% a message is sent before the link attach is guaranteed to
@@ -602,13 +602,13 @@ subscribe(Config) ->
602602 [begin
603603 receive {amqp10_msg , Receiver , Msg } ->
604604 ok = amqp10_client :accept_msg (Receiver , Msg )
605- after ? TOUT -> ct :fail (timeout )
605+ after ? TIMEOUT -> ct :fail (timeout )
606606 end
607607 end || _ <- lists :seq (1 , 10 )],
608608 ok = assert_no_message (Receiver ),
609609
610610 receive {amqp10_event , {link , Receiver , credit_exhausted }} -> ok
611- after ? TOUT -> flush (),
611+ after ? TIMEOUT -> flush (),
612612 exit (credit_exhausted_assert )
613613 end ,
614614
@@ -856,7 +856,7 @@ multi_transfer_without_delivery_id(Config) ->
856856 receive
857857 {amqp10_msg , Receiver , _InMsg } ->
858858 ok
859- after ? TOUT ->
859+ after ? TIMEOUT ->
860860 exit (delivery_timeout )
861861 end ,
862862
@@ -911,7 +911,7 @@ incoming_heartbeat(Config) ->
911911 {closed , _ }}}
912912 when Connection0 =:= Connection ->
913913 ok
914- after ? TOUT ->
914+ after ? TIMEOUT ->
915915 exit (incoming_heartbeat_assert )
916916 end ,
917917 demonitor (MockRef ).
@@ -928,7 +928,7 @@ await_link(Who, What, Err) ->
928928 {amqp10_event , {link , Who0 , {detached , Why }}}
929929 when Who0 =:= Who ->
930930 ct :fail (Why )
931- after ? TOUT ->
931+ after ? TIMEOUT ->
932932 flush (),
933933 ct :fail (Err )
934934 end .
@@ -945,7 +945,7 @@ await_disposition(DeliveryTag) ->
945945 receive
946946 {amqp10_disposition , {accepted , DeliveryTag0 }}
947947 when DeliveryTag0 =:= DeliveryTag -> ok
948- after ? TOUT ->
948+ after ? TIMEOUT ->
949949 flush (),
950950 ct :fail (dispostion_timeout )
951951 end .
@@ -970,7 +970,7 @@ receive_messages0(Receiver, N, Acc) ->
970970 receive
971971 {amqp10_msg , Receiver , Msg } ->
972972 receive_messages0 (Receiver , N - 1 , [Msg | Acc ])
973- after ? TOUT ->
973+ after ? TIMEOUT ->
974974 LastReceivedMsg = case Acc of
975975 [] -> none ;
976976 [M | _ ] -> M
0 commit comments