aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-09-18 15:20:47 +0200
committerAnders Svensson <[email protected]>2017-09-18 15:20:47 +0200
commit445ed7f183e40186f44b0af3c4b19bd65262c9a0 (patch)
treefa4b995dfd3a6f5b28d35765a2893d7fa8642e82 /lib/diameter/test
parent7762e599aedd9bbc62a995f39b6b2230ee26fba5 (diff)
parentd38295257c5309e7291487edfacdfad605eec3e9 (diff)
downloadotp-445ed7f183e40186f44b0af3c4b19bd65262c9a0.tar.gz
otp-445ed7f183e40186f44b0af3c4b19bd65262c9a0.tar.bz2
otp-445ed7f183e40186f44b0af3c4b19bd65262c9a0.zip
Merge branch 'anders/diameter/sctp/OTP-10889' into maint
* anders/diameter/sctp/OTP-10889: Make unordered delivery configurable
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index ffb4a508cd..c224f9a27e 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -533,9 +533,10 @@ add_transports(Config) ->
LRef = ?util:listen(SN,
[T,
{sender, SS},
- {message_cb, ST andalso {?MODULE, message, [0]}}
- | [{packet, hd(?util:scramble([false, raw]))}
- || T == sctp andalso CS]],
+ {message_cb, ST andalso {?MODULE, message, [0]}}]
+ ++ [{packet, hd(?util:scramble([false, raw]))}
+ || T == sctp andalso CS]
+ ++ [{unordered, unordered()} || T == sctp],
[{capabilities_cb, fun capx/2},
{pool_size, 8}
| server_apps()]
@@ -551,13 +552,17 @@ add_transports(Config) ->
Id <- [{D,E}]],
?util:write_priv(Config, "transport", [LRef | Cs]).
+unordered() ->
+ element(rand:uniform(4), {true, false, 1, 2}).
+
client_opts(tcp) ->
[];
client_opts(sctp) ->
- [{sctp_initmsg, #sctp_initmsg{num_ostreams = N,
- max_instreams = 5}}
- || N <- [rand:uniform(8)],
- N =< 6].
+ [{unordered, unordered()}
+ | [{sctp_initmsg, #sctp_initmsg{num_ostreams = N,
+ max_instreams = 5}}
+ || N <- [rand:uniform(8)],
+ N =< 6]].
server_apps() ->
B = have_nas(),