Reviewed: https://review.openstack.org/451934 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8a0faef877a18d931178a2ed1d55734aa91e32d3 Submitter: Jenkins Branch: master
commit 8a0faef877a18d931178a2ed1d55734aa91e32d3 Author: Ihar Hrachyshka <ihrac...@redhat.com> Date: Thu Mar 30 15:56:29 2017 +0000 TestTrackedResource: register core plugin in directory This is achieved by switching the test class to BaseTestCase and using setup_coreplugin. This makes later calls to neutron.objects.db.api functions that extract the plugin from plugins directory to work. The test class registers some sqlalchemy events for models not registered in BASEV2, which later makes unregister_events fail because of failure to compare those model classes with other registered model classes (those that belong to proper model classes like Port). Before the patch, the core plugin was not correctly registered in plugins directory, and no code was actually loading the plugin, so no other sqla events were in _REGISTERED_SQLA_EVENTS, which explains why previously calls to unregister_events hasn't failed. Good news is that the new parent class does clean up all events itself, so we don't need to set the cleanup hook ourselves. This switch also facilitated removal of some other preparatory steps from the class that are already implemented in the new parent. Closes-Bug: #1677636 Change-Id: Id462e532066ac3cd5e2f76c3670da7f7820c6581 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1677636 Title: TestTrackedResource.test_resync failed with AttributeError: 'NoneType' object has no attribute '_get_collection_query' Status in neutron: Fix Released Bug description: http://logs.openstack.org/18/442518/11/gate/neutron-coverage-ubuntu- xenial/e0c4f27/console.html 2017-03-30 11:30:54.119979 | Traceback (most recent call last): 2017-03-30 11:30:54.120013 | File "neutron/tests/base.py", line 116, in func 2017-03-30 11:30:54.120036 | return f(self, *args, **kwargs) 2017-03-30 11:30:54.120070 | File "neutron/tests/unit/quota/test_resource.py", line 255, in test_resync 2017-03-30 11:30:54.120091 | res.mark_dirty(self.context) 2017-03-30 11:30:54.120120 | File "neutron/quota/resource.py", line 190, in mark_dirty 2017-03-30 11:30:54.120151 | quota_api.set_quota_usage_dirty(context, self.name, tenant_id) 2017-03-30 11:30:54.120177 | File "neutron/db/api.py", line 163, in wrapped 2017-03-30 11:30:54.120199 | return method(*args, **kwargs) 2017-03-30 11:30:54.120266 | File "/home/jenkins/workspace/neutron-coverage-ubuntu-xenial/.tox/cover/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 963, in wrapper 2017-03-30 11:30:54.120302 | return fn(*args, **kwargs) 2017-03-30 11:30:54.120338 | File "neutron/db/quota/api.py", line 119, in set_quota_usage_dirty 2017-03-30 11:30:54.120366 | context, resource=resource, project_id=tenant_id) 2017-03-30 11:30:54.120394 | File "neutron/objects/base.py", line 425, in get_object 2017-03-30 11:30:54.120417 | **cls.modify_fields_to_db(kwargs) 2017-03-30 11:30:54.120446 | File "neutron/objects/db/api.py", line 32, in get_object 2017-03-30 11:30:54.120476 | return _get_filter_query(context, model, **kwargs).first() 2017-03-30 11:30:54.120506 | File "neutron/objects/db/api.py", line 27, in _get_filter_query 2017-03-30 11:30:54.120542 | query = plugin._get_collection_query(context, model, filters) 2017-03-30 11:30:54.120580 | AttributeError: 'NoneType' object has no attribute '_get_collection_query' To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1677636/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp