From 68077a4cc9af638256a272cda42b44346d90589d Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 14 Jun 2019 15:50:39 +0000 Subject: [PATCH] Increase TestDhcpAgentHA.agent_down_time to 30 seconds Currently there is a delay (around 20 seconds) between the the agent update call and the server reply, due to the testing servers load. This time should be higher than the agent-server communication delay but still short enough to detect when the DHCP agent is dead during the active wait during the DHCP agent network rescheduling. "log_agent_heartbeats" is activated to add information about when the server has processed the agent report status call. This log will allow to check the different between the server updating time and the previous agent heartbeat timestamp. Conflicts: neutron/tests/fullstack/resources/config.py Change-Id: Icf9a8802585c908fd4a70d0508139a81d5ac90ee Related-Bug: #1799555 (cherry picked from commit d7c5ae8a0378fa50853e91241426b6470ffe7492) --- neutron/tests/fullstack/resources/config.py | 3 ++- neutron/tests/fullstack/test_dhcp_agent.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/neutron/tests/fullstack/resources/config.py b/neutron/tests/fullstack/resources/config.py index d839e28f39f..7c624282e53 100644 --- a/neutron/tests/fullstack/resources/config.py +++ b/neutron/tests/fullstack/resources/config.py @@ -81,7 +81,8 @@ class NeutronConfigFixture(ConfigFixture): 'policy_file': self._generate_policy_json(), }, 'agent': { - 'report_interval': str(env_desc.agent_down_time / 2.0) + 'report_interval': str(env_desc.agent_down_time / 2.0), + 'log_agent_heartbeats': 'True', }, }) # Set root_helper/root_helper_daemon only when env var is set diff --git a/neutron/tests/fullstack/test_dhcp_agent.py b/neutron/tests/fullstack/test_dhcp_agent.py index d93acf114dd..52208fc90b6 100644 --- a/neutron/tests/fullstack/test_dhcp_agent.py +++ b/neutron/tests/fullstack/test_dhcp_agent.py @@ -124,7 +124,7 @@ class TestDhcpAgentNoHA(BaseDhcpAgentTest): class TestDhcpAgentHA(BaseDhcpAgentTest): number_of_hosts = 2 - agent_down_time = 10 + agent_down_time = 30 def _wait_until_network_rescheduled(self, old_agent): def _agent_rescheduled():