The unit tests were previously consuming an excessive amount of memory
(4GB+) due to plugin instances persisting in memory. Deallocation was
not possible where a combination of circular references and mocking
was involved. This patch ensures that only NeutronManager holds a
plugin reference and that all other references are instances of
weakref.proxy. Residual memory footprint for tox executed on a
12-core machine has been reduced to ~1.3GB. Plugin deallocation is
validated at the end of each test to prevent regressions.
This change also includes fixes to unit tests that depended on plugin
instances persisting across tests.
Reviewed: https:/ /review. openstack. org/102329 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=478f4871fff 9b2e3d5754ad431 65b0356e07c58f
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 478f4871fff9b2e 3d5754ad43165b0 356e07c58f
Author: Maru Newby <email address hidden>
Date: Wed May 7 22:41:40 2014 +0000
Ensure core plugin deallocation after every test
The unit tests were previously consuming an excessive amount of memory
(4GB+) due to plugin instances persisting in memory. Deallocation was
not possible where a combination of circular references and mocking
was involved. This patch ensures that only NeutronManager holds a
plugin reference and that all other references are instances of
weakref.proxy. Residual memory footprint for tox executed on a
12-core machine has been reduced to ~1.3GB. Plugin deallocation is
validated at the end of each test to prevent regressions.
This change also includes fixes to unit tests that depended on plugin
instances persisting across tests.
Conflicts:
neutron/ tests/base. py tests/unit/ ml2/test_ mechanism_ odl.py tests/unit/ test_db_ plugin. py
neutron/
neutron/
Partial-Bug: #1234857 72ef77d290d054f 3c48ab58c94 41863926fa1a91d 2d3ea484ec)
Change-Id: Ia1f868c2d206eb
(cherry picked from commit 6db48dd688d45ba