From 40417e67820b38dc5492211554ac2ac1cd272f09 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Fri, 11 Jul 2014 07:58:41 +0000 Subject: [PATCH] Mock out tunnel_sync in test to avoid sleeping The tunnel_sync call in the daemon loop for the ovs tunnel tests blocks for 30 seconds. This patch mocks it out to stop that. Closes-Bug: #1340570 Change-Id: I58c3907ed564413a8251bc1bb7922e25f673db18 --- neutron/tests/unit/openvswitch/test_ovs_tunnel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py index 4600abf46..32f37f092 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py +++ b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py @@ -520,8 +520,10 @@ class TunnelTest(base.BaseTestCase): mock.patch.object(ovs_neutron_agent.OVSNeutronAgent, 'scan_ports'), mock.patch.object(ovs_neutron_agent.OVSNeutronAgent, - 'process_network_ports') - ) as (log_exception, scan_ports, process_network_ports): + 'process_network_ports'), + mock.patch.object(ovs_neutron_agent.OVSNeutronAgent, + 'tunnel_sync') + ) as (log_exception, scan_ports, process_network_ports, ts): log_exception.side_effect = Exception( 'Fake exception to get out of the loop') scan_ports.side_effect = [reply2, reply3] -- 2.45.2