<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 6, 2015 at 9:03 AM, Doug Hellmann <span dir="ltr"><<a href="mailto:doug@doughellmann.com" target="_blank">doug@doughellmann.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">As part of updating oslo.messaging to move it out of the oslo namespace package I ran into some issues with heat. While debugging, I tried running the heat unit tests using the modified version of oslo.messaging and ran into test failures because the tests are mocking private parts of the library that are moving to have new names.<br>
<br>
Mocking internal parts of Oslo libraries isn’t supported, and so I need someone from the heat team to work with me to fix the heat tests and possibly add missing fixtures to oslo.messaging to avoid breaking heat when we release the updated oslo.messaging. I tried raising attention on IRC in #heat but I think I’m in the wrong timezone compared to most of the heat devs.<br></blockquote><div><br></div><div>Hi Doug,<br><br></div><div>This should help you along: <a href="https://review.openstack.org/#/c/145094/">https://review.openstack.org/#/c/145094/</a><br></div><div><br></div><div>-Angus<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Here’s an example of one of the failing tests:<br>
<br>
======================================================================<br>
FAIL: heat.tests.test_stack_lock.StackLockTest.test_failed_acquire_existing_lock_engine_alive<br>
tags: worker-3<br>
----------------------------------------------------------------------<br>
Traceback (most recent call last):<br>
File "heat/tests/test_stack_lock.py", line 84, in test_failed_acquire_existing_lock_engine_alive<br>
self.m.StubOutWithMock(messaging.rpc.client._CallContext, "call")<br>
AttributeError: 'module' object has no attribute '_CallContext'<br>
Traceback (most recent call last):<br>
_StringException: Empty attachments:<br>
pythonlogging:'alembic'<br>
pythonlogging:'cliff'<br>
pythonlogging:'heat-provision'<br>
pythonlogging:'heat_integrationtests'<br>
pythonlogging:'heatclient'<br>
pythonlogging:'iso8601'<br>
pythonlogging:'keystoneclient'<br>
pythonlogging:'migrate'<br>
pythonlogging:'neutronclient'<br>
pythonlogging:'novaclient'<br>
pythonlogging:'oslo'<br>
pythonlogging:'oslo_config'<br>
pythonlogging:'oslo_messaging'<br>
pythonlogging:'requests'<br>
pythonlogging:'routes'<br>
pythonlogging:'saharaclient'<br>
pythonlogging:'sqlalchemy'<br>
pythonlogging:'stevedore'<br>
pythonlogging:'swiftclient'<br>
pythonlogging:'troveclient'<br>
<br>
pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}<br>
<br>
Traceback (most recent call last):<br>
File "heat/tests/test_stack_lock.py", line 84, in test_failed_acquire_existing_lock_engine_alive<br>
self.m.StubOutWithMock(messaging.rpc.client._CallContext, "call")<br>
AttributeError: 'module' object has no attribute '_CallContext'<br>
<br>
Traceback (most recent call last):<br>
_StringException: Empty attachments:<br>
pythonlogging:'alembic'<br>
pythonlogging:'cliff'<br>
pythonlogging:'heat-provision'<br>
pythonlogging:'heat_integrationtests'<br>
pythonlogging:'heatclient'<br>
pythonlogging:'iso8601'<br>
pythonlogging:'keystoneclient'<br>
pythonlogging:'migrate'<br>
pythonlogging:'neutronclient'<br>
pythonlogging:'novaclient'<br>
pythonlogging:'oslo'<br>
pythonlogging:'oslo_config'<br>
pythonlogging:'oslo_messaging'<br>
pythonlogging:'requests'<br>
pythonlogging:'routes'<br>
pythonlogging:'saharaclient'<br>
pythonlogging:'sqlalchemy'<br>
pythonlogging:'stevedore'<br>
pythonlogging:'swiftclient'<br>
pythonlogging:'troveclient'<br>
<br>
pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}<br>
<br>
Traceback (most recent call last):<br>
File "heat/tests/test_stack_lock.py", line 84, in test_failed_acquire_existing_lock_engine_alive<br>
self.m.StubOutWithMock(messaging.rpc.client._CallContext, "call")<br>
AttributeError: 'module' object has no attribute ‘_CallContext'<br>
<br>
<br>
That class _CallContext isn’t part of the public API for oslo.messaging, and so it is not being exposed through the redirect modules I’m creating for backwards compatibility. We need to look for a way to create a fixture to do whatever it is these tests are trying to do — I don’t understand the tests, which is why I need a heat developer to help out.<br>
<br>
Doug<br>
<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div></div>