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 a4ffd1a2f9)
This commit is contained in:
yatinkarel 2021-11-24 19:53:19 +05:30 committed by yatin
parent 11a9a6ff7d
commit 8439348add
1 changed files with 4 additions and 0 deletions

View File

@ -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,