File 2407-snmp-manager-test-Use-factor-when-calc-number-of-inf.patch of Package erlang
From 4e9a0e0bdd5c838e18ac1a1786cd0100d9113061 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Wed, 15 Apr 2020 08:52:02 +0200
Subject: [PATCH 07/14] [snmp|manager|test] Use 'factor' when calc number of
informs to send
Use 'factor' when calculating the number of informs to send
during the inform_swarm test case(s).
Also write out that number at the start.
---
lib/snmp/test/snmp_manager_SUITE.erl | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/snmp/test/snmp_manager_SUITE.erl b/lib/snmp/test/snmp_manager_SUITE.erl
index 6e695f5ddf..c22c8918dc 100644
--- a/lib/snmp/test/snmp_manager_SUITE.erl
+++ b/lib/snmp/test/snmp_manager_SUITE.erl
@@ -4764,7 +4764,8 @@ do_inform_swarm(Config) ->
"~p ~n", [Config]),
MgrNode = ?config(manager_node, Config),
- AgentNode = ?config(agent_node, Config),
+ AgentNode = ?config(agent_node, Config),
+ Factor = ?config(snmp_factor, Config),
?line ok = mgr_user_load_mib(MgrNode, snmpv2_mib()),
Test2Mib = test2_mib(Config),
@@ -4776,7 +4777,7 @@ do_inform_swarm(Config) ->
?line ok = agent_load_mib(AgentNode, Test2Mib),
?line ok = agent_load_mib(AgentNode, TestTrapMib),
?line ok = agent_load_mib(AgentNode, TestTrapv2Mib),
- NumInforms = 2000,
+ NumInforms = 2000 div Factor,
Collector = self(),
@@ -4836,11 +4837,11 @@ do_inform_swarm(Config) ->
Commands =
[
- {1, "Manager and agent info at start of test", Cmd1},
- {2, "Send notification(s) from agent", Cmd2},
- {3, "Await send-ack(s)/inform(s)/response(s)", Cmd3},
- {4, "Sleep some time (1 sec)", Cmd4},
- {5, "Manager and agent info after test completion", Cmd1}
+ {1, "Manager and agent info at start of test", Cmd1},
+ {2, ?F("Send ~p notification(s) from agent", [NumInforms]),Cmd2},
+ {3, "Await send-ack(s)/inform(s)/response(s)", Cmd3},
+ {4, "Sleep some time (1 sec)", Cmd4},
+ {5, "Manager and agent info after test completion", Cmd1}
],
Res = command_handler(Commands),
--
2.16.4