diff options
author | Anders Svensson <anders@erlang.org> | 2020-02-12 13:48:11 +0100 |
---|---|---|
committer | Anders Svensson <anders@erlang.org> | 2020-02-12 15:25:35 +0100 |
commit | e3db347077f99b455ad671a9d768226ef2905ac0 (patch) | |
tree | df461729cbfb53f6105ceaca44274c18f2e25e73 | |
parent | 92316dd79418669e06829306b3048a98d7b0c878 (diff) | |
download | erlang-e3db347077f99b455ad671a9d768226ef2905ac0.tar.gz |
Skip traffic tests differently
The reduction of the number of traffic cases in the parent commit speeds
up testing, but common_test doesn't seem to do well with the large
number of groups returned from groups/0: one for each of the 1440 config
variants and a few more.
Randomly skip variants when building the groups list instead of when
init_per_group/2 is invoked, to reduce the running time from 12 minutes
mentioned in the parent commit to around 8.
-rw-r--r-- | lib/diameter/test/diameter_traffic_SUITE.erl | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index e5c35be9ca..452bd28333 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -305,7 +305,8 @@ names() -> S <- ?STRING_DECODES, ST <- ?CALLBACKS, SS <- ?SENDERS, - CS <- ?SENDERS]. + CS <- ?SENDERS, + ?SKIP =< rand:uniform()]. names(Names, []) -> [N || N <- Names, @@ -336,14 +337,9 @@ init_per_group(_) -> init_per_group(Name, Config) when Name == shuffle; Name == parallel -> - case rand:uniform() < ?SKIP of - true -> - {skip, random}; - false -> - start_services(Config), - add_transports(Config), - replace({sleep, Name == parallel}, Config) - end; + start_services(Config), + add_transports(Config), + replace({sleep, Name == parallel}, Config); init_per_group(sctp = Name, Config) -> {_, Sctp} = lists:keyfind(Name, 1, Config), |