File 2412-snmp-manager-test-Test-case-timeout-calculation-s.patch of Package erlang
From 91d1e62a72b869b0da05b8446144f3f8be68501a Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Fri, 17 Apr 2020 09:38:29 +0200
Subject: [PATCH 12/14] [snmp|manager|test] Test case timeout calculation(s)
---
 lib/snmp/test/snmp_manager_SUITE.erl | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/snmp/test/snmp_manager_SUITE.erl b/lib/snmp/test/snmp_manager_SUITE.erl
index 4b16dc5d6e..41576769b4 100644
--- a/lib/snmp/test/snmp_manager_SUITE.erl
+++ b/lib/snmp/test/snmp_manager_SUITE.erl
@@ -529,18 +529,16 @@ init_per_testcase2(Case, Config) ->
 
     Family = proplists:get_value(ipfamily, Config, inet),
 
+    Factor = ?config(snmp_factor, Config),
     TO = case Case of
              inform3 ->
-                 ?MINS(2);
+                 ?MINS(2 + (Factor div 2));
              InformSwarm when (InformSwarm =:= inform_swarm_cbp_def) orelse
                               (InformSwarm =:= inform_swarm_cbp_temp) orelse
                               (InformSwarm =:= inform_swarm_cbp_perm) ->
-                 case ?config(snmp_factor, Config) of
-                     N when is_integer(N) -> ?MINS(2*N);
-                     _                    -> ?MINS(2)
-                 end;
+                 ?MINS(1 + Factor);
              _ ->
-                 ?MINS(1)
+                 ?MINS(1 + (Factor div 2))
          end,
     ?IPRINT("Set test case timetrap: ~p", [TO]),
     ct:timetrap(TO),
-- 
2.16.4