aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-08-29 09:08:38 +0200
committerAnders Svensson <[email protected]>2017-08-29 14:51:55 +0200
commit549a82df3ae250b7c5598a9451b7b9802073d6f9 (patch)
tree368fc425a1195df386e29cd98096dade94bb0f92 /lib/diameter
parent0447bd6e8bcd3b0249b9956883c213c434095ec5 (diff)
downloadotp-549a82df3ae250b7c5598a9451b7b9802073d6f9.tar.gz
otp-549a82df3ae250b7c5598a9451b7b9802073d6f9.tar.bz2
otp-549a82df3ae250b7c5598a9451b7b9802073d6f9.zip
Exercise unordered delivery in traffic suite
By randomly setting the number of outbound streams on associations.
Diffstat (limited to 'lib/diameter')
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 1760d7c5dc..f058ed65b8 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -112,6 +112,8 @@
%% diameter_{tcp,sctp} callbacks
-export([message/3]).
+-include_lib("kernel/include/inet_sctp.hrl").
+
-include("diameter.hrl").
-include("diameter_gen_base_rfc3588.hrl").
-include("diameter_gen_base_accounting.hrl").
@@ -486,7 +488,7 @@ add_transports(Config) ->
| server_apps()]
++ [{spawn_opt, {erlang, spawn, []}} || CS]),
Cs = [?util:connect(CN,
- [T, {sender, CS}],
+ [T, {sender, CS} | client_opts(T)],
LRef,
[{id, Id}
| client_apps(R, [{'Origin-State-Id', origin(Id)}])])
@@ -496,6 +498,14 @@ add_transports(Config) ->
Id <- [{D,E}]],
?util:write_priv(Config, "transport", [LRef | Cs]).
+client_opts(tcp) ->
+ [];
+client_opts(sctp) ->
+ [{sctp_initmsg, #sctp_initmsg{num_ostreams = N,
+ max_instreams = 5}}
+ || N <- [rand:uniform(8)],
+ N =< 6].
+
server_apps() ->
B = have_nas(),
[{applications, [diameter_gen_base_rfc3588,