summaryrefslogtreecommitdiffstats
path: root/tests/unit/rpc/test_kombu.py
Commit message (Collapse)AuthorAgeFilesLines
* Enable hacking H402 testSergey Lukjanov2013-06-031-8/+8
| | | | | | H402 one line docstring needs punctuation Change-Id: Ie848453cace318d8310cdf0234c512f4c1121119
* Enable hacking H403 testSergey Lukjanov2013-05-301-1/+2
| | | | | | H403 multi line docstring end on new line Change-Id: I33249651026b54ef346214965e909835288bb14e
* Fixes import order nitsZhongyue Luo2013-05-151-1/+1
| | | | Change-Id: I4fdc8eed74dd90d6450864daba7492d5e7266448
* Convert unicode for python3 portabilityChuck Short2013-05-061-4/+6
| | | | | | | | | | | | | From http://docs.python.org/3.1/whatsnew/3.0.html: "Python 3.0 uses the concepts of text and (binary) data instead of Unicode strings and 8-bit strings." Use six.text_type to Type for representing (Unicode) textual data. This is unicode() in Python 2 and str in Python 3. Change-Id: I3da268a714a34a8e626a2590f01b86e414dc3411 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Update to use flake8.Monty Taylor2013-03-241-3/+3
| | | | | | | flake8 is pluggable and handles pep8 and pyflakes, as well as configuration through tox.ini. It also removes the need for flakes.py. Change-Id: If5f7d8ad348b4fb8119fa4ec7b5e9d17bdc72a39
* Removes unused imports in the tests moduleZhongyue Luo2013-03-201-1/+0
| | | | | | Fixes bug #1157596 Change-Id: I36d5484eaa2f0e21188eed6e70cc1ad785233d6a
* blueprint amqp-rpc-fast-reply-queueRaymond Pekowski2013-02-181-2/+2
| | | | | | | | | | | For AMQP based RPC, specifically RabbitMQ and Qpid, this change replaces the dynamically created RPC call reply queue with a single queue that is created on the first RPC call and used on all subsequent calls. It provides backward compatibility on the callee side by recognizing downlevel callers and on the caller side by adding a config option to revert to the old dynamically created queue based upon the msg_id. Change-Id: Idb09a71472866bd3950f58d4f7f45a3181eb40fc
* Use oslo-config-2013.1b3Mark McLoughlin2013-02-171-1/+1
| | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b3 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Remove the 'deps = pep8==1.3.3' and 'deps = pyflakes' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Add join_consumer_pool() to RPC connectionsDoug Hellmann2013-02-131-0/+34
| | | | | | | | | | | | | | | blueprint move-listener-framework-oslo bug 1047015 bug 1111632 Ceilometer and Quantum use private methods of the RPC connection object to configure themselves to listen to a queue shared among a group of workers. This change adds a public method to the RPC connection to support this use case, without resorting to using private API calls. Change-Id: I3a89f1dfdcf8accca70cf305f7a31315bea093d8 Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
* Add TTL to AMQP messagesBrent Eagles2013-01-281-0/+19
| | | | | | | | | | This patch sets a TTL derived from the timeout parameter used when invoking the RPC. Needed for: * Bug 1053614 Change-Id: Idaf9a2a972feac3f95f170c52632033b027b4414
* Replace direct use of testtools BaseTestCase.Monty Taylor2013-01-241-1/+0
| | | | | | | | | Using the BaseTestCase across the tests in the tree lets us put in log fixtures and consistently handle mox and stubout. Part of blueprint grizzly-testtools. Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
* Replaced direct usage of stubout with BaseTestCase.Monty Taylor2013-01-241-4/+0
| | | | | | | | BaseTestCase properly hooks stubout into fixtures. Just use that. Part of blueprint grizzly-testtools. Change-Id: I4bf6b92b9b16d051d8c6ecaf52cf70925848ed8c
* Use testtools as test base class.Monty Taylor2013-01-241-42/+12
| | | | | | | | | | | | | On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtools.skipTest Part of blueprint grizzly-testtools. Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
* Fixes import order errorsZhongyue Luo2013-01-181-1/+1
| | | | Change-Id: I3e35230dd2d96ab9f5a8c11b9ec1cd8d2d00e347
* Add a rpc envelope format version number.Russell Bryant2013-01-021-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a message envelope that includes a envelope format version number. This message envelope will allow us to embed additional metadata later on, such as a signature for the message payload. Up to this point, we've deferred message serialization as a responsibility of the messaging library we're using by passing it a message as Python types and letting it deal with how to pass it over a network. This patch adds json serialization in the rpc layer of the application message payload before passing the message down into the messaging library. There are some benefits to be gained by doing a pass at serialization ourselves. As an example, we occasionally hit serialization bugs that only affect some messaging drivers. The kombu driver has always had a nice advantage. It uses anyjson internally for serializing messages, which we hook into using our jsonutils module. When there is a problem serializing, we automatically use to_primitive() to fix it. This patch allows all drivers to take advantage of this automatic message fix-up. This also creates a convenient common hook point for messages coming in and out of the system, regardless of the driver in use. While this changes the base format of the messages sent between nodes, it has been done in a backwards compatible manner. The new message format will not be used by default. The idea is that all nodes will be upgraded to a version that is capable of receiving the new format (Grizzly) before switching it on. We will turn it on post-Grizzly. Implement blueprint version-rpc-messages. Change-Id: Ib6b2d11ca42abaa64c40986d72233e7048e504a0
* Add exchange_name parameter to TopicConsumerJulien Danjou2012-09-271-0/+80
| | | | | | | | | | | In Ceilometer, we need to consume messages from different exchanges of type 'topic', so being able to specify the exchange name rather than using the default in TopicConsumer is necessary. This fixes bug #1055483 Change-Id: Ibbaec8496f24c0b221cf489258af1e7fe362e84a Signed-off-by: Julien Danjou <julien@danjou.info>
* Support for several HA RabbitMQ servers.Eugene Kirpichov2012-09-251-17/+131
| | | | | | | | Use the rabbit_ha_queues boolean option. It is off by default, and you need to wipe RabbitMQ Mnesia database (/var/lib/rabbitmq/mnesia) when changing it. Change-Id: Id06692a142d1e5316602f6ceed4ccad615ce74c1
* Use BaseTestCase for all tests which override configMark McLoughlin2012-07-201-6/+3
| | | | | | | | | Fixes bug #1027120 We already have nice helper methods for overriding config and cleaning up the overrides, so let's use them. Change-Id: Ibd501743d1c4ec21cb2b0d22382cb681ee5768ed
* Update common code to support pep 1.3.Gary Kotton2012-06-181-33/+35
| | | | | | bug 1014216 Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
* Add rpc to openstack-common.Russell Bryant2012-06-061-0/+414
Implements blueprint common-rpc. This patch imports nova.rpc to openstack-common. All of the necessary changes to the core code to make it compatible with openstack-common have been done in nova, so the only changes made here are to imports. There are more changes made to the tests, but nothing that changes the core functionality of the tests. Change-Id: I17330aa4adfd0f22c449a2376833c7fe9dfd0cf1