]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix intermittent failure in TestNetworksFailover UT
authorarmando-migliaccio <armamig@gmail.com>
Tue, 24 Mar 2015 22:09:35 +0000 (15:09 -0700)
committerKevin Benton <blak111@gmail.com>
Sat, 21 Mar 2015 13:09:09 +0000 (06:09 -0700)
commitc0289458fa9055ee488989828951d15fa2a06da3
tree96505ec6adf775256b377f0c57df0bc0aa117100
parentddf7a29e48d580172d43b482ed8fac62ac0d180d
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.

Co-Author: Jenkins <jenkins@review.openstack.org>

Change-Id: I60ad7fa8ca874f93b7f806a0e035be84180a5de9
Closes-bug: #1432958
neutron/tests/unit/test_db_plugin.py
neutron/tests/unit/testlib_plugin.py