aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-08-10 12:01:38 +0200
committerAnders Svensson <[email protected]>2017-08-11 01:50:32 +0200
commitfbc0fe7de4af5d24bd5ccd3eaf2417fbb436da27 (patch)
treef294663e32e3a30c6cb135d17140045d86725604
parenteb5fa7e2a0f67924828ea3d81891b86d08a53b0c (diff)
downloadotp-fbc0fe7de4af5d24bd5ccd3eaf2417fbb436da27.tar.gz
otp-fbc0fe7de4af5d24bd5ccd3eaf2417fbb436da27.tar.bz2
otp-fbc0fe7de4af5d24bd5ccd3eaf2417fbb436da27.zip
Randomly disable traffic counters in traffic suite
To exercise the new traffic_counters option.
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 1760d7c5dc..4e70a960c5 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -460,12 +460,17 @@ start_services(Config) ->
server_decoding = SD}
= Grp
= group(Config),
- ok = diameter:start_service(SN, [{decode_format, SD}
+ ok = diameter:start_service(SN, [{traffic_counters, bool()},
+ {decode_format, SD}
| ?SERVICE(SN, Grp)]),
- ok = diameter:start_service(CN, [{sequence, ?CLIENT_MASK},
+ ok = diameter:start_service(CN, [{traffic_counters, bool()},
+ {sequence, ?CLIENT_MASK},
{strict_arities, decode}
| ?SERVICE(CN, Grp)]).
+bool() ->
+ 0.5 =< rand:uniform().
+
add_transports(Config) ->
#group{transport = T,
encoding = E,