aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_traffic_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-06-10 15:33:49 +0200
committerAnders Svensson <[email protected]>2017-06-12 16:11:53 +0200
commit9296f611de2055c65bdae9425ce80e63fba6610f (patch)
tree478206de60e05e456f4681c085a46fea2bd7e6a6 /lib/diameter/test/diameter_traffic_SUITE.erl
parent090898729237d33b0a6968ece9f11741cde7c27b (diff)
downloadotp-9296f611de2055c65bdae9425ce80e63fba6610f.tar.gz
otp-9296f611de2055c65bdae9425ce80e63fba6610f.tar.bz2
otp-9296f611de2055c65bdae9425ce80e63fba6610f.zip
Randomly select traffic testcases
Since the number of configuration variants tested makes for (too) many. Randomly select a subset of testcases in each configuration group.
Diffstat (limited to 'lib/diameter/test/diameter_traffic_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 6aa3ffb7af..bb10638cd2 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -341,7 +341,11 @@ init_per_group(Name, Config) ->
server_strings = SD,
server_sender = SS,
server_throttle = ST},
- [{group, G} | Config];
+ %% Limit the number of testcase, since the number of
+ %% groups is large.
+ All = ?util:scramble(tc()),
+ TCs = lists:sublist(All, rand:uniform(32)),
+ [{group, G}, {runlist, TCs} | Config];
_ ->
Config
end.
@@ -359,12 +363,16 @@ end_per_group(_, _) ->
%% Skip testcases that can reasonably fail under SCTP.
init_per_testcase(Name, Config) ->
+ TCs = proplists:get_value(runlist, Config, []),
+ Run = [] == TCs orelse lists:member(Name, TCs),
case [G || #group{transport = sctp} = G
<- [proplists:get_value(group, Config)]]
of
[_] when Name == send_maxlen;
Name == send_long ->
{skip, sctp};
+ _ when not Run ->
+ {skip, random};
_ ->
[{testcase, Name} | Config]
end.