aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-12-14 12:18:08 +0100
committerAnders Svensson <[email protected]>2011-12-16 18:25:30 +0100
commit77dd5031ae786d518573251fc1f0dd1f43cccd31 (patch)
tree2aad5cb285e223932fb24dad428f60bf2e676e82
parent696811485ad4d1463a24ae6b064849c2e4ebebd7 (diff)
downloadotp-77dd5031ae786d518573251fc1f0dd1f43cccd31.tar.gz
otp-77dd5031ae786d518573251fc1f0dd1f43cccd31.tar.bz2
otp-77dd5031ae786d518573251fc1f0dd1f43cccd31.zip
Minor capx suite tweaks
-rw-r--r--lib/diameter/test/diameter_capx_SUITE.erl35
1 files changed, 20 insertions, 15 deletions
diff --git a/lib/diameter/test/diameter_capx_SUITE.erl b/lib/diameter/test/diameter_capx_SUITE.erl
index 88b798d563..4270210a10 100644
--- a/lib/diameter/test/diameter_capx_SUITE.erl
+++ b/lib/diameter/test/diameter_capx_SUITE.erl
@@ -93,15 +93,23 @@
-define(cea, #diameter_base_CEA).
-define(answer_message, #'diameter_base_answer-message').
+-define(fail(T), erlang:error({T, process_info(self(), messages)})).
+
+-define(TIMEOUT, 2000).
+
%% ===========================================================================
suite() ->
[{timetrap, {seconds, 10}}].
-all() ->
- [start, start_services, add_listeners
- | [{group, N} || {N, _, _} <- groups()]]
- ++ [remove_listeners, stop_services, stop].
+all() -> [start,
+ start_services,
+ add_listeners,
+ {group, sequential},
+ {group, parallel},
+ remove_listeners,
+ stop_services,
+ stop].
groups() ->
Ts = testcases(),
@@ -270,8 +278,8 @@ s_client_reject(Config) ->
?packet{}}}
= Info ->
Info
- after 2000 ->
- fail({LRef, OH})
+ after ?TIMEOUT ->
+ ?fail({LRef, OH})
end.
c_client_reject(Config) ->
@@ -307,8 +315,8 @@ server_closed(Config, F, RC) ->
= Reason,
{listen, _}}} ->
Reason
- after 2000 ->
- fail({LRef, OH})
+ after ?TIMEOUT ->
+ ?fail({LRef, OH})
end.
%% server_reject/3
@@ -328,8 +336,8 @@ server_reject(Config, F, RC) ->
= Reason,
{listen, _}}} ->
Reason
- after 2000 ->
- fail({LRef, OH})
+ after ?TIMEOUT ->
+ ?fail({LRef, OH})
end.
%% cliient_closed/4
@@ -350,8 +358,8 @@ client_recv(CRef) ->
?event{service = ?CLIENT,
info = {closed, CRef, Reason, {connect, _}}} ->
Reason
- after 2000 ->
- fail(CRef)
+ after ?TIMEOUT ->
+ ?fail(CRef)
end.
%% server_capx/3
@@ -373,9 +381,6 @@ client_capx(_, ?caps{origin_host = {[_,$_|"client_reject." ++ _], _}}) ->
%% ===========================================================================
-fail(T) ->
- erlang:error({T, process_info(self(), messages)}).
-
host(Config) ->
{_, H} = lists:keyfind(host, 1, Config),
?HOST(H).