aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_relay_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diameter/test/diameter_relay_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_relay_SUITE.erl12
1 files changed, 10 insertions, 2 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)}.