aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2013-04-09 15:57:19 +0200
committerAnders Svensson <[email protected]>2013-04-15 10:10:02 +0200
commit96d04d58fd91062a6e5f96fbc6cce49ee325d087 (patch)
tree1e94d8f450fa4c4a2933254d96896c173b669f70 /lib/diameter
parentba278bc64de031a571c8c5ea01d84287c67307db (diff)
downloadotp-96d04d58fd91062a6e5f96fbc6cce49ee325d087.tar.gz
otp-96d04d58fd91062a6e5f96fbc6cce49ee325d087.tar.bz2
otp-96d04d58fd91062a6e5f96fbc6cce49ee325d087.zip
Lighten up on suite timetraps
Due to sporadic timeouts one some (slow) hosts.
Diffstat (limited to 'lib/diameter')
-rw-r--r--lib/diameter/test/diameter_app_SUITE.erl2
-rw-r--r--lib/diameter/test/diameter_distribution_SUITE.erl10
-rw-r--r--lib/diameter/test/diameter_examples_SUITE.erl2
-rw-r--r--lib/diameter/test/diameter_tls_SUITE.erl18
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl7
5 files changed, 20 insertions, 19 deletions
diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl
index 209f72adf1..1e262895a6 100644
--- a/lib/diameter/test/diameter_app_SUITE.erl
+++ b/lib/diameter/test/diameter_app_SUITE.erl
@@ -56,7 +56,7 @@
%% ===========================================================================
suite() ->
- [{timetrap, {seconds, 10}}].
+ [{timetrap, {seconds, 60}}].
all() ->
[keys,
diff --git a/lib/diameter/test/diameter_distribution_SUITE.erl b/lib/diameter/test/diameter_distribution_SUITE.erl
index 01d3507b27..f069abbe2f 100644
--- a/lib/diameter/test/diameter_distribution_SUITE.erl
+++ b/lib/diameter/test/diameter_distribution_SUITE.erl
@@ -28,7 +28,7 @@
all/0]).
%% testcases
--export([enslave/1,
+-export([enslave/1, enslave/0,
ping/1,
start/1,
connect/1,
@@ -36,7 +36,7 @@
send_remote/1,
send_timeout/1,
send_failover/1,
- stop/1]).
+ stop/1, stop/0]).
%% diameter callbacks
-export([peer_up/3,
@@ -126,6 +126,9 @@ all() ->
%% Start four slave nodes, one to implement a Diameter server,
%% two three to implement a client.
+enslave() ->
+ [{timetrap, {seconds, 30*length(?NODES)}}].
+
enslave(Config) ->
Here = filename:dirname(code:which(?MODULE)),
Ebin = filename:join([Here, "..", "ebin"]),
@@ -225,6 +228,9 @@ connect(Config) ->
%%
%% Stop the slave nodes.
+stop() ->
+ [{timetrap, {seconds, 30*length(?NODES)}}].
+
stop(_Config) ->
[] = [{N,E} || {N,_} <- ?NODES,
{error, _, _} = E <- [ct_slave:stop(N)]].
diff --git a/lib/diameter/test/diameter_examples_SUITE.erl b/lib/diameter/test/diameter_examples_SUITE.erl
index 585fc9d3b8..98b280f1a4 100644
--- a/lib/diameter/test/diameter_examples_SUITE.erl
+++ b/lib/diameter/test/diameter_examples_SUITE.erl
@@ -65,7 +65,7 @@
%% ===========================================================================
suite() ->
- [{timetrap, {seconds, 45}}].
+ [{timetrap, {minutes, 2}}].
all() ->
[dict,
diff --git a/lib/diameter/test/diameter_tls_SUITE.erl b/lib/diameter/test/diameter_tls_SUITE.erl
index 5a79c63d36..55565692ec 100644
--- a/lib/diameter/test/diameter_tls_SUITE.erl
+++ b/lib/diameter/test/diameter_tls_SUITE.erl
@@ -181,7 +181,7 @@ start_diameter(_Config) ->
ok = diameter:start().
make_certs() ->
- [{timetrap, {seconds, 30}}].
+ [{timetrap, {minutes, 2}}].
make_certs(Config) ->
Dir = proplists:get_value(priv_dir, Config),
@@ -302,9 +302,7 @@ set([H|T], Vs) ->
disconnect({{LRef, _PortNr}, CRef}) ->
ok = diameter:remove_transport(?CLIENT, CRef),
- ok = receive #diameter_event{info = {down, LRef, _, _}} -> ok
- after 2000 -> false
- end.
+ receive #diameter_event{info = {down, LRef, _, _}} -> ok end.
realm(Host) ->
tl(lists:dropwhile(fun(C) -> C /= $. end, Host)).
@@ -365,13 +363,11 @@ ssl([{ssl_options = T, Opts}]) ->
connect(Host, {_LRef, PortNr}, {Caps, Opts}) ->
{ok, Ref} = diameter:add_transport(Host, ?CONNECT(PortNr, Caps, Opts)),
- ok = receive
- #diameter_event{service = Host,
- info = {up, Ref, _, _, #diameter_packet{}}} ->
- ok
- after 2000 ->
- false
- end,
+ receive
+ #diameter_event{service = Host,
+ info = {up, Ref, _, _, #diameter_packet{}}} ->
+ ok
+ end,
Ref.
copts(S, Opts)
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index e3a81b562c..e3caacd795 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -568,7 +568,7 @@ send_detach(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
Ref = make_ref(),
ok = call(Config, Req, [{extra, [{self(), Ref}]}, detach]),
- Ans = receive {Ref, T} -> T after 2000 -> false end,
+ Ans = receive {Ref, T} -> T end,
['STA', _SessionId, {'Result-Code', ?SUCCESS} | _]
= Ans.
@@ -1089,7 +1089,6 @@ request(#diameter_base_STR{'Session-Id' = SId},
{'Origin-Host', OH},
{'Origin-Realm', OR}]};
-%% send_error
+%% send_error/send_timeout
request(#diameter_base_RAR{}, _Caps) ->
- receive after 2000 -> ok end,
- {protocol_error, ?TOO_BUSY}.
+ receive after 2000 -> {protocol_error, ?TOO_BUSY} end.