Fix intermittent failure in TestNetworksFailover UT
Ensure that the periodic check does not get in the way of method
calls being tested, by stopping the periodic task from running.
This patch moves the mock for the periodic check into the
setup_coreplugin call so it gets called by unit tests that
use the core plugin.
The previous location after the construction of the API router was
too late because the core plugin was already constructed by the
neutron manager. This led to random failures because the periodic
tasks leaked by all of the unit tests would occasionally preempt
test_reschedule_network_from_down_agent in automatically removing
a network from an agent.
Reviewed: https:/ /review. openstack. org/167414 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=c0289458fa9 055ee4889898289 51d15fa2a06da3
Committed: https:/
Submitter: Jenkins
Branch: master
commit c0289458fa9055e e488989828951d1 5fa2a06da3
Author: armando-migliaccio <email address hidden>
Date: Tue Mar 24 15:09:35 2015 -0700
Fix intermittent failure in TestNetworksFai lover UT
Ensure that the periodic check does not get in the way of method
calls being tested, by stopping the periodic task from running.
This patch moves the mock for the periodic check into the coreplugin call so it gets called by unit tests that
setup_
use the core plugin.
The previous location after the construction of the API router was reschedule_ network_ from_down_ agent in automatically removing
too late because the core plugin was already constructed by the
neutron manager. This led to random failures because the periodic
tasks leaked by all of the unit tests would occasionally preempt
test_
a network from an agent.
Co-Author: Jenkins <email address hidden>
Change-Id: I60ad7fa8ca874f 93b7f806a0e035b e84180a5de9
Closes-bug: #1432958