diff options
author | Anders Svensson <[email protected]> | 2011-10-09 20:36:31 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-10-10 11:27:07 +0200 |
commit | 52f3b4e508cf1f43c88bd20b0e1e6cc75ec4f020 (patch) | |
tree | 57b1353d4f2c531b4ba6cb59029f378eab3acf1f /lib/diameter/test/diameter_traffic_SUITE.erl | |
parent | 698360f3a8c7bb8298d70ccc054cd2124a11f10e (diff) | |
download | otp-52f3b4e508cf1f43c88bd20b0e1e6cc75ec4f020.tar.gz otp-52f3b4e508cf1f43c88bd20b0e1e6cc75ec4f020.tar.bz2 otp-52f3b4e508cf1f43c88bd20b0e1e6cc75ec4f020.zip |
Use tcp/sctp port resolution from testsuites
Diffstat (limited to 'lib/diameter/test/diameter_traffic_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_traffic_SUITE.erl | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index f6905473b7..d85539edce 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -253,21 +253,6 @@ tc() -> send_multiple_filters_3, send_anything]. -portnr() -> - portnr(20). - -portnr(N) - when 0 < N -> - case diameter_reg:match({diameter_tcp, listener, '_'}) of - [{T, _Pid}] -> - {_, _, {_LRef, {_Addr, LSock}}} = T, - {ok, PortNr} = inet:port(LSock), - PortNr; - [] -> - receive after 50 -> ok end, - portnr(N-1) - end. - %% =========================================================================== %% start/stop testcases @@ -281,7 +266,8 @@ start_services(_Config) -> add_transports(Config) -> {ok, LRef} = diameter:add_transport(?SERVER, ?LISTEN), true = diameter:subscribe(?CLIENT), - {ok, CRef} = diameter:add_transport(?CLIENT, ?CONNECT(portnr())), + [PortNr] = ?util:lport(tcp, LRef, 20), + {ok, CRef} = diameter:add_transport(?CLIENT, ?CONNECT(PortNr)), {up, CRef, _Peer, _Cfg, #diameter_packet{}} = receive #diameter_event{service = ?CLIENT, info = I} -> I after 2000 -> false |