aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <anders@erlang.org>2013-01-26 16:43:34 +0100
committerAnders Svensson <anders@erlang.org>2013-02-08 15:28:56 +0100
commit9164fd998b986327ad0c5e03acc476feb1898bda (patch)
treec204af7c0484b356af13423e169a78130fd2e27f
parentf115a9f7428abd12b8ec50d4cbeb654b3efa0eb1 (diff)
downloadotp-9164fd998b986327ad0c5e03acc476feb1898bda.tar.gz
otp-9164fd998b986327ad0c5e03acc476feb1898bda.tar.bz2
otp-9164fd998b986327ad0c5e03acc476feb1898bda.zip
Add testcases to traffic suite
That check for unexpected entries in the request table.
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index b03a9ce4d1..f8db4a6863 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -80,7 +80,9 @@
send_multiple_filters_2/1,
send_multiple_filters_3/1,
send_anything/1,
+ outstanding/1,
remove_transports/1,
+ empty/1,
stop_services/1,
stop/1]).
@@ -202,7 +204,7 @@ all() ->
C <- ?CONTAINERS,
A <- ?ENCODINGS,
P <- [[], [parallel]]]
- ++ [remove_transports, stop_services, stop].
+ ++ [outstanding, remove_transports, empty, stop_services, stop].
groups() ->
Ts = tc(),
@@ -288,6 +290,11 @@ add_transports(Config) ->
|| C <- ?CONNECTIONS],
?util:write_priv(Config, "transport", [LRef | Cs]).
+%% Ensure there are no outstanding requests in request table.
+outstanding(_Config) ->
+ [] = [T || T <- ets:tab2list(diameter_request),
+ is_atom(element(1,T))].
+
remove_transports(Config) ->
[LRef | Cs] = ?util:read_priv(Config, "transport"),
[?util:disconnect(?CLIENT, C, ?SERVER, LRef) || C <- Cs].
@@ -296,6 +303,10 @@ stop_services(_Config) ->
ok = diameter:stop_service(?CLIENT),
ok = diameter:stop_service(?SERVER).
+%% Ensure even transports have been removed from request table.
+empty(_Config) ->
+ [] = ets:tab2list(diameter_request).
+
stop(_Config) ->
ok = diameter:stop().