The exchanges lock in the fake driver was being disregarded,
probably due to a typo.
Closes-Bug: #1342088
Change-Id: I45261fce501a867b9253112e1608b14ed5afea26
According to the IBM Style Guide the Latin abbreviation 'e.g.'
should be replace by 'for example'.
Change-Id: I694df5ed62213e29bdf35f781fd6f310b7df77a6
Checking identity of strings is not a great idea.
It might not work with different implementations. (eg. pypy)
Test usual equality instead.
Change-Id: Ib1a673a0ac116f2c80d066e94a8bd9a9ef8f518a
Even in case of libraries and when they are not big like nova.
It is better to use next rules:
1) structure of tests directory is the same as a root of project
Tests directory will be well organized, and it will be simple to find
where to write tests
2) names for end modules should be test_<name_of_testing_module>.py
Change-Id: I75b4b3df4fffc8dfe389c547ae7a004d1b278ecc
Even in case of libraries and when they are not big like nova.
It is better to use next rules:
1) structure of tests directory is the same as a root of project
Tests directory will be well organized, and it will be simple to find
where to write tests
2) names for end modules should be test_<name_of_testing_module>.py
Change-Id: I069121c5f32bbe51c6795e51c23ff3630fcd43e2
The notification listener tests have a listener endpoint that will stop
the listener thread when a certain number of messages have been
received. If this doesn't work, the main thread will time out its
join() after 5 seconds and the only way sign of this is that the test
took over 5 seconds.
Let's make stop_listener() return a boolean indicating whether the the
thread has stopped or we timed out, and assert that the thread has
stopped.
Fix a few cases where the thread hasn't stopped. In the 'two exchanges'
case, we send three messages but only two are to the exchanges we are
listening on. In the tests using the HANDLED return value, the info()
handler which stops the thread was never been called because that
endpoint was last in the endpoints list.
Change-Id: Iea2486f23cee073c3891188d7aabb22ae945900d
There is a non-printable character (c2a0) in a comment line, which
in a new Neutron test case causes a StringException. There are
three issues here.
1) Encoding issue in the file.
2) No detection of encoding issues in files.
3) Neutron tests mask the failure detail
This addresses the first issue. Bug 1334798 in Neutron was created
for the last issue. Oslo team is aware of the second issue.
Related-Bug: #1334798
Change-Id: I8cfa6c93085a26666a8b4bee06dcd52709d04a95
The listener of ListenerSetupMixin had an incorrect info implementation
that couldn't be called properly. This patch fixes the method signature.
Change-Id: I33153f04ce23474cfaffaa1db20b8582befa324d
We're currently including these docs under the RPC server and
notification listener sections causing sphinx to have a minor panic
attack.
WARNING: duplicate object description of oslo.messaging.MessageHandlingServer
Change-Id: I76a4d9a7f55f7b65bcdd2bdb814904dc55bd1068
Even in case of libraries and when they are not big like nova.
It is better to use next rules:
1) structure of tests directory is the same as a root of project
Tests directory will be well organized, and it will be simple to find
where to write tests
2) names for end modules should be test_<name_of_testing_module>.py
Change-Id: Ie13d1b709e863f6a9babaaa2bf1e042ef9251671
The sync includes change that makes sure we get unicode-only dicts from
jsonutils no matter which json module implementation is selected.
The latest commit in oslo-incubator:
- 2e1214b74b5448825d3db26e1308a51b468d3d5c
Included commits:
* gettextutils.py:
- de4adbc4: pep8: fixed multiple violations
- 9912e5df: Add API for creating translation functions
- 6cc96d05: Fix test_gettextutils on Python 3
- fd33d1ea: Fix gettextutil.Message handling of deep copy failures
- 047b2e4e: Change lazy translation to retain complete dict
- 6d55e26a: Add support for translating log levels separately
* importutils.py:
- 1173e469: Remove ValueError when accessing sys.modules
- 885828af: Deleted duplicated method in cliutils.
* jsonutils.py:
- 0d7296f6: Add kwargs to jsonutils.load(s) functions
- 18f2bc1b: Enforce unicode json output for jsonutils.load[s]()
- 9e5a3938: jsonutils.load() accepts file pointer, not string
* timeutils.py:
- 250cd88c: Fixed a new pep8 error and a small typo
The sync adds new module: strutils.
Disabled pep8 import checks for gettextutils to avoid raising 'H302:
import only modules.'
Change-Id: Ic815ca3df94c33edec9104172048b2cd94b92e3f
Closes-Bug: 1314129
The fanout queues of the fake driver are created at the first executor
poll, but if we use eventlet executor and the fake driver, when the sender
delivers a fanout message before the first poll, the message goes to the
topic queue instead of the server fanout queue.
The changes fixes that by ensuring the all queues exists when the
listener is created.
Closes bug #1331453
Change-Id: I92e7c01dd87d634b741bbcaea92f48730fdd555e
The eventlet executor need additional code to make the RPC server sample
work. Using the blocking executor makes things easier to setup for a
newcomer.
Change-Id: I56dfa54a178962d4ced34e2f15eaf9312b7087cc
Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this.
Change-Id: I67cc0774a65886ef9fce0b72e52157b622248a85
Closes-Bug: #1327473