aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-07-12 11:43:06 +0200
committerAnders Svensson <[email protected]>2017-08-10 18:13:45 +0200
commitfa233bb7bc4f37632166c468a0381e695433c318 (patch)
tree2fc12b2c66d10813479c41b4698208677b8bfdd3
parent1339269fefcbd688b3eb4bde2bb6c55fe2e1b17d (diff)
downloadotp-fa233bb7bc4f37632166c468a0381e695433c318.tar.gz
otp-fa233bb7bc4f37632166c468a0381e695433c318.tar.bz2
otp-fa233bb7bc4f37632166c468a0381e695433c318.zip
Limit SCTP testing in traffic suite
All SCTP testing on Solaris/Sparc was disabled in commit 69c5a741, but there are issues on other platforms as well, resulting in failures in diameter_gen_sctp_SUITE and more. The problems seem to be load-related, when testcases are run in parallel, so only run a smallish subset sequentially until the gen_sctp suite runs without error.
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index eb2fdb7721..f05c850513 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -125,7 +125,7 @@
%% Positive number of testcases from which to select (randomly) from
%% tc(), the list of testcases to run, or [] to run all. The random
%% selection is to limit the time it takes for the suite to run.
--define(LIMIT, 42).
+-define(LIMIT, #{tcp => 42, sctp => 5}).
-define(util, diameter_util).
@@ -269,12 +269,15 @@ all() ->
-define(GROUPS, []).
%-define(GROUPS, [[tcp,rfc6733,record,map,false,false,false,false]]).
+%% Issues with gen_sctp sporadically cause huge numbers of failed
+%% testcases when running testcases in parallel.
groups() ->
Names = names(),
[{P, [P], Ts} || Ts <- [tc()], P <- [shuffle, parallel]]
++
- [{?util:name(N), [], [{group, if S -> shuffle; not S -> parallel end}]}
- || [_,_,_,_,S|_] = N <- Names]
+ [{?util:name(N), [], [{group, if T == sctp; S -> shuffle;
+ true -> parallel end}]}
+ || [T,_,_,_,S|_] = N <- Names]
++
[{T, [], [{group, ?util:name(N)} || N <- names(Names, ?GROUPS),
T == hd(N)]}
@@ -348,7 +351,7 @@ init_per_group(Name, Config) ->
server_decoding = D,
server_sender = SS,
server_throttle = ST},
- [{group, G}, {runlist, select()} | Config];
+ [{group, G}, {runlist, select(T)} | Config];
_ ->
Config
end.
@@ -362,9 +365,10 @@ end_per_group(Name, Config)
end_per_group(_, _) ->
ok.
-select() ->
- try rand:uniform(?LIMIT) of
- N -> lists:sublist(?util:scramble(tc()), max(N,5))
+select(T) ->
+ try maps:get(T, ?LIMIT) of
+ N ->
+ lists:sublist(?util:scramble(tc()), max(5, rand:uniform(N)))
catch
error:_ -> ?LIMIT
end.