aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/test/diameter_relay_SUITE.erl12
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl6
-rw-r--r--lib/diameter/test/diameter_util.erl11
3 files changed, 21 insertions, 8 deletions
diff --git a/lib/diameter/test/diameter_relay_SUITE.erl b/lib/diameter/test/diameter_relay_SUITE.erl
index f766f54a80..b5e520e642 100644
--- a/lib/diameter/test/diameter_relay_SUITE.erl
+++ b/lib/diameter/test/diameter_relay_SUITE.erl
@@ -171,8 +171,9 @@ connect(Config) ->
Conns)).
disconnect(Config) ->
- lists:foreach(fun({{CN,CR},{SN,SR}}) -> ?util:disconnect(CN,CR,SN,SR) end,
- ?util:read_priv(Config, "cfg")).
+ [] = [{T,C} || C <- ?util:read_priv(Config, "cfg"),
+ T <- [break(C)],
+ T /= ok].
stop_services(_Config) ->
[] = [{H,T} || H <- ?SERVICES,
@@ -184,6 +185,13 @@ stop(_Config) ->
%% ----------------------------------------
+break({{CN,CR},{SN,SR}}) ->
+ try
+ ?util:disconnect(CN,CR,SN,SR)
+ after
+ diameter:remove_transport(SN, SR)
+ end.
+
server(Name, Dict) ->
ok = diameter:start_service(Name, ?SERVICE(Name, Dict)),
{Name, ?util:listen(Name, tcp)}.
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 976abf9138..6f3a4801ee 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -428,7 +428,11 @@ remove_transports(Config) ->
server_service = SN}
= group(Config),
[LRef | Cs] = ?util:read_priv(Config, "transport"),
- [?util:disconnect(CN, C, SN, LRef) || C <- Cs].
+ try
+ [] = [T || C <- Cs, T <- [?util:disconnect(CN, C, SN, LRef)], T /= ok]
+ after
+ ok = diameter:remove_transport(SN, LRef)
+ end.
stop_services(Config) ->
#group{client_service = CN,
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl
index 52b747e99c..f26f1e999a 100644
--- a/lib/diameter/test/diameter_util.erl
+++ b/lib/diameter/test/diameter_util.erl
@@ -345,11 +345,12 @@ transport(SvcName, Ref) ->
disconnect(Client, Ref, Server, LRef) ->
true = diameter:subscribe(Server),
ok = diameter:remove_transport(Client, Ref),
- ok = receive
- {diameter_event, Server, {down, LRef, _, _}} -> ok
- after 10000 ->
- {Client, Ref, Server, LRef, process_info(self(), messages)}
- end.
+ receive
+ {diameter_event, Server, {down, LRef, _, _}} ->
+ ok
+ after 10000 ->
+ {Client, Ref, Server, LRef, process_info(self(), messages)}
+ end.
%% ---------------------------------------------------------------------------