From 0bb9e7f639042f8803c3937581ddc9210fd60418 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 22 Aug 2017 13:14:57 +0200 Subject: Work around more common_test woe Testcase init functions are getting Config from groups and suites they're not in. Presumably related to the problems worked around in the parent commit. --- lib/diameter/test/diameter_traffic_SUITE.erl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib') diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index a2c0f7fae6..d6d69eafa1 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -375,6 +375,16 @@ select() -> %% -------------------- +%% Work around common_test accumulating Config improperly, causing +%% testcases to get Config from groups and suites they're not in. +init_per_testcase(N, Config) + when N == rfc4005; + N == start; + N == result_codes; + N == empty; + N == stop -> + Config; + %% Skip testcases that can reasonably fail under SCTP. init_per_testcase(Name, Config) -> TCs = proplists:get_value(runlist, Config, []), @@ -397,6 +407,9 @@ end_per_testcase(_, _) -> ok. %% replace/2 +%% +%% Work around common_test running init functions inappropriately, and +%% this accumulating more config than expected. replace(Pairs, Config) when is_list(Pairs) -> -- cgit v1.2.3