From 8439348addb649459609f22fecc9a6fb8be7ed75 Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Wed, 24 Nov 2021 19:53:19 +0530 Subject: [PATCH] Set report_interval to 0 for ovs agent unit tests Unit tests are taking longer than usual since [1] and causing timeouts in unit tests jobs intermittently. Set report_interval(as this is now used to set RPC timeout) to 0 so report_state responds immediately. [1] https://review.opendev.org/q/I8a95e80ca74edc8f8f394cefc749c4065a8e0575 Related-Bug: #1948676 Change-Id: I653c907a4323e19d5bc381cd3716d42c45a75e15 (cherry picked from commit a4ffd1a2f98cea425d2e1c887bcaecd655fcd473) --- .../ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py b/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py index 9b9364c3ca8..56f8d9b7807 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py +++ b/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py @@ -128,6 +128,8 @@ class TestOvsNeutronAgent(object): cfg.CONF.set_default('quitting_rpc_timeout', 10, 'AGENT') cfg.CONF.set_default('local_ip', '127.0.0.1', 'OVS') cfg.CONF.set_default('host', 'host') + # Set report_interval to 0 so rpc calls responds immediately + cfg.CONF.set_override('report_interval', 0, 'AGENT') mock.patch( 'neutron.agent.ovsdb.native.helpers.enable_connection_uri').start() mock.patch( @@ -3029,6 +3031,8 @@ class TestOvsDvrNeutronAgent(object): cfg.CONF.set_default('firewall_driver', 'neutron.agent.firewall.NoopFirewallDriver', group='SECURITYGROUP') + # Set report_interval to 0 so rpc calls responds immediately + cfg.CONF.set_override('report_interval', 0, 'AGENT') mock.patch('neutron.agent.common.ovs_lib.BaseOVS.config', new_callable=mock.PropertyMock,