11 Commits

Author SHA1 Message Date
Javeme
166cfbfb1b Fixed a couple of pep8 errors/warnings
Fixed pep8 errors:
 * E127 continuation line over-indented for visual indent
 * E226 missing whitespace around arithmetic operator
 * E231 missing whitespace after ','
 * E241 multiple spaces after ','
 * E261 at least two spaces before inline comment
 * E301 expected 1 blank line, found 0
 * E302 expected 2 blank lines, found 1
 * E303 too many blank lines (2)
 * E501 line too long (80 > 79 characters)

Fixed pep8 warnings:
 * W292 no newline at end of file
 * W391 blank line at end of file

Change-Id: I1736f8a42c3a335a17a0b9b6e64782487ed3a495
2016-01-25 15:00:49 +08:00
Javeme
417f079c2b assertIsNone(val) instead of assertEqual(None,val)
use assertIsNone(val) instead of assertEqual(None, val).

Change-Id: Ib395d3805b9affca06477ffeca7d7cad070ebb7e
2015-12-21 19:07:43 +08:00
Davanum Srinivas
97892e656a Merge remote-tracking branch 'origin/feature/zmq' into merge-branch
Change-Id: If189d03131efc02045955508cef06fdd2ed590ee
2015-09-15 11:07:44 -04:00
Victor Sergeyev
48f2a87a27 Fix work with timeout in CallRequest.receive_reply()
Refactored CallRequest.receive_reply() method to raise MessagingTimeout
exception, when timeout is reached.  Removed unused _to_milliseconds() method

Functional test CallTestCase.test_timeout() passes now

Change-Id: Idc3224646c3626a56606d019ff7ff155d3e3201a
2015-07-10 15:50:47 +03:00
Doug Hellmann
c7b31385ac Fix mock use for mock 1.1.0
Correct the way we check the calls by using the proper mock method. Add
a new test to expand coverage of the area being fixed.

Change-Id: I344ee52dd0ea77bc45b6d3e2713ae1ba8b225ffc
2015-07-10 12:22:26 +00:00
Victor Stinner
72c501454e Use unittest.mock on Python 3
The mock module has been added to Python 3.3 as unittest.mock.

The third party mock module doesn't seem to be maintained anymore: the
last commit was in April 2013.

unittest.mock is more recent, has less bugs and is compatible with
Python 3.4. There are bugs on Python 3 in the third party mock module,
examples:

* https://code.google.com/p/mock/issues/detail?id=225
* https://code.google.com/p/mock/issues/detail?id=234

Oslo Messaging hits these issues when running tests on Python 3.4.

Import oslotest to setup six.moves for mock.

Change-Id: Ic160101695cea67eb9bbbfcaddb8d3dac64e6804
2015-04-16 00:07:48 +02:00
Joshua Harlow
8da14f68d3 Use the oslo_utils stop watch in decaying timer
The decaying timer can now just use the functionality
of the oslo_utils stop watch to avoid having to maintain
similar information itself; now it just becomes a thin
layer ontop of that object that provides its functionality.

Change-Id: I1b014b821a6b980590ca5b4d850a515d55c42208
2015-03-23 20:06:22 -07:00
David Medberry
410d8f0e4d Fix a couple typos to make it easier to read.
Change-Id: If5ed92aebc873fbcab705e20922706eb46da8c39
2015-03-17 15:11:11 -06:00
Mehdi Abaakouk
434b5c8781 Declare DirectPublisher exchanges with passive=True
If rabbit dies, the consumer can be disconnected before the publisher
sends, and if the consumer hasn't declared the queue, the publisher's
will send a message to an exchange that's not bound to a queue, and
the message wll be lost.  Setting passive=True will cause the
publisher to fail and retry if the consumer hasn't declared the
receiving queue yet.

Co-Authored-By: Noel Burton-Krahn <noel@burton-krahn.com>
Closes-Bug: #1338732
Change-Id: I5ba4d311b97236d3a85a9f5badff61f12b08c12d
2015-01-27 11:07:51 +01:00
Mehdi Abaakouk
0c49f0d0ca Add TimerTestCase missing tests case
A tests case class have been missed is the namespace removal changes.

Change-Id: Ie2984260fc6ab74c5766d73c98dd9b1d05d8ee2d
2015-01-15 15:42:42 +01:00
Doug Hellmann
e55a83e832 Move files out of the namespace package
Move the public API out of oslo.messaging to oslo_messaging. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Co-authored-by: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Change-Id: Ia562010c152a214f1c0fed767c82022c7c2c52e7
2015-01-12 12:50:41 -05:00