Tests: system_SUITE increase timeout

This commit is contained in:
Diana Parra Corbacho 2024-11-27 15:44:07 +01:00
parent d004d69200
commit 69061277bc
1 changed files with 20 additions and 18 deletions

View File

@ -16,6 +16,8 @@
-compile([export_all, nowarn_export_all]).
-define(TOUT, 30000).
suite() ->
[{timetrap, {minutes, 4}}].
@ -184,7 +186,7 @@ open_close_connection(Config) ->
{ok, Connection2} = amqp10_client:open_connection(OpnConf),
receive
{amqp10_event, {connection, Connection2, opened}} -> ok
after 5000 -> exit(connection_timeout)
after ?TOUT -> exit(connection_timeout)
end,
ok = amqp10_client:close_connection(Connection2),
ok = amqp10_client:close_connection(Connection).
@ -201,7 +203,7 @@ open_connection_plain_sasl(Config) ->
{ok, Connection} = amqp10_client:open_connection(OpnConf),
receive
{amqp10_event, {connection, Connection, opened}} -> ok
after 5000 -> exit(connection_timeout)
after ?TOUT -> exit(connection_timeout)
end,
ok = amqp10_client:close_connection(Connection).
@ -225,7 +227,7 @@ open_connection_plain_sasl_parse_uri(Config) ->
{ok, Connection} = amqp10_client:open_connection(OpnConf),
receive
{amqp10_event, {connection, Connection, opened}} -> ok
after 5000 -> exit(connection_timeout)
after ?TOUT -> exit(connection_timeout)
end,
ok = amqp10_client:close_connection(Connection).
@ -245,7 +247,7 @@ open_connection_plain_sasl_failure(Config) ->
% some implementation may simply close the tcp_connection
{amqp10_event, {connection, Connection, {closed, shutdown}}} -> ok
after 5000 ->
after ?TOUT ->
ct:pal("Connection process is alive? = ~tp~n",
[erlang:is_process_alive(Connection)]),
exit(connection_timeout)
@ -469,27 +471,27 @@ notify_with_performative(Config) ->
{ok, Connection} = amqp10_client:open_connection(OpenConf),
receive {amqp10_event, {connection, Connection, {opened, #'v1_0.open'{}}}} -> ok
after 5000 -> ct:fail({missing_event, ?LINE})
after ?TOUT -> ct:fail({missing_event, ?LINE})
end,
{ok, Session1} = amqp10_client:begin_session(Connection),
receive {amqp10_event, {session, Session1, {begun, #'v1_0.begin'{}}}} -> ok
after 5000 -> ct:fail({missing_event, ?LINE})
after ?TOUT -> ct:fail({missing_event, ?LINE})
end,
{ok, Sender1} = amqp10_client:attach_sender_link(Session1, <<"sender 1">>, <<"/exchanges/amq.fanout">>),
receive {amqp10_event, {link, Sender1, {attached, #'v1_0.attach'{}}}} -> ok
after 5000 -> ct:fail({missing_event, ?LINE})
after ?TOUT -> ct:fail({missing_event, ?LINE})
end,
ok = amqp10_client:detach_link(Sender1),
receive {amqp10_event, {link, Sender1, {detached, #'v1_0.detach'{}}}} -> ok
after 5000 -> ct:fail({missing_event, ?LINE})
after ?TOUT -> ct:fail({missing_event, ?LINE})
end,
ok = amqp10_client:end_session(Session1),
receive {amqp10_event, {session, Session1, {ended, #'v1_0.end'{}}}} -> ok
after 5000 -> ct:fail({missing_event, ?LINE})
after ?TOUT -> ct:fail({missing_event, ?LINE})
end,
%% Test that the amqp10_client:*_sync functions work.
@ -501,7 +503,7 @@ notify_with_performative(Config) ->
ok = amqp10_client:close_connection(Connection),
receive {amqp10_event, {connection, Connection, {closed, #'v1_0.close'{}}}} -> ok
after 5000 -> ct:fail({missing_event, ?LINE})
after ?TOUT -> ct:fail({missing_event, ?LINE})
end.
% a message is sent before the link attach is guaranteed to
@ -600,13 +602,13 @@ subscribe(Config) ->
[begin
receive {amqp10_msg, Receiver, Msg} ->
ok = amqp10_client:accept_msg(Receiver, Msg)
after 2000 -> ct:fail(timeout)
after ?TOUT -> ct:fail(timeout)
end
end || _ <- lists:seq(1, 10)],
ok = assert_no_message(Receiver),
receive {amqp10_event, {link, Receiver, credit_exhausted}} -> ok
after 5000 -> flush(),
after ?TOUT -> flush(),
exit(credit_exhausted_assert)
end,
@ -854,7 +856,7 @@ multi_transfer_without_delivery_id(Config) ->
receive
{amqp10_msg, Receiver, _InMsg} ->
ok
after 2000 ->
after ?TOUT ->
exit(delivery_timeout)
end,
@ -909,7 +911,7 @@ incoming_heartbeat(Config) ->
{closed, _}}}
when Connection0 =:= Connection ->
ok
after 5000 ->
after ?TOUT ->
exit(incoming_heartbeat_assert)
end,
demonitor(MockRef).
@ -926,7 +928,7 @@ await_link(Who, What, Err) ->
{amqp10_event, {link, Who0, {detached, Why}}}
when Who0 =:= Who ->
ct:fail(Why)
after 5000 ->
after ?TOUT ->
flush(),
ct:fail(Err)
end.
@ -943,7 +945,7 @@ await_disposition(DeliveryTag) ->
receive
{amqp10_disposition, {accepted, DeliveryTag0}}
when DeliveryTag0 =:= DeliveryTag -> ok
after 3000 ->
after ?TOUT ->
flush(),
ct:fail(dispostion_timeout)
end.
@ -955,7 +957,7 @@ count_received_messages0(Receiver, Count) ->
receive
{amqp10_msg, Receiver, _Msg} ->
count_received_messages0(Receiver, Count + 1)
after 500 ->
after 5000 ->
Count
end.
@ -968,7 +970,7 @@ receive_messages0(Receiver, N, Acc) ->
receive
{amqp10_msg, Receiver, Msg} ->
receive_messages0(Receiver, N - 1, [Msg | Acc])
after 5000 ->
after ?TOUT ->
LastReceivedMsg = case Acc of
[] -> none;
[M | _] -> M