dparalen d1dac1c11d Class-level _exchanges in FakeExchangeManager
The FakeExchangeManager uses an instance-level storage for FakeExchanges
mapping[1].  When a client--server pair is created, each keeps their own
instance of FakeDriver -> FakeExchangeManager -> FakeExchange, each of
which has their own (instance-level) copy of e.g _server_queues[2], making
it impossible for them to communicate.

This patch makes the _exchanges mapping a class-level attribute in order
to keep the registered exchanges shared between all Manager instances,
allowing client and server communication (within a single process).

The test_server unit-tests had to be refactored to explicitly pass an exchange
name when building a target. This is required for an exchange name change to
have any effect during a test case run time when compared to passing the
exchange name through the URL. This issue was revealed with this patch.

[1] https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_fake.py#L145,#L148
[2] https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_fake.py#L88,#L92

Change-Id: I8dff66f4cafeb1f4c57dbfbfaba5d49e50f55fee
Closes-Bug: #1714055
2017-08-02 08:23:34 +02:00
2015-09-24 18:11:22 +08:00
2017-03-30 12:32:58 +00:00
2014-06-05 22:48:44 +02:00
2017-01-02 11:34:02 +01:00
2017-04-08 22:39:02 +08:00
2017-08-04 05:27:43 +00:00
2017-03-04 01:51:17 +00:00
2017-06-22 11:02:49 +08:00

Team and repository tags

image

Oslo Messaging Library

Latest Version

Downloads

The Oslo messaging API supports RPC and notifications over a number of different messaging transports.

Description
OpenStack library for messaging
Readme 36 MiB
Languages
Python 99.8%
Shell 0.2%