commit | fda9594010b13d99134c10cff54b0ba9d82c0c27 | [log] [tgz] |
---|---|---|
author | Alan Conway <aconway@redhat.com> | Thu Feb 09 11:12:56 2017 -0500 |
committer | Alan Conway <aconway@redhat.com> | Fri Feb 10 14:21:47 2017 -0500 |
tree | 8c343a0af960a2a0c49fec00737c30302ccbcbd7 | |
parent | 99f2c3178b87b7e9af3a387a25b115fa868c4c79 [diff] |
QPID-7317: More robust qpid.selector with better logging This commit disables the selector and related qpid.messaging objects when the selector thread exits for any reason: process exit, fork, exception etc. Any subsequent use will throw an exception and log the locations of the failed call and where the selector thread was stopped. This should be slightly more predictable & robust than commit 037c573 which tried to keep the selector alive in a daemon thread. I have not been able to hang the pulp_smash test suite with this patch. The new logging shows that celery workers do sometimes use qpid.messaging in an illegal state, which could cause the reported hang. So far I have not seen a stack trace that is an exact match for reported stacks. If this patch does not address the pulp problem it should at least provide much better debugging information in journalctl log output after the hang.
This distribution contains a Python client implementation and AMQP conformance tests for Apache Qpid.
You can read more about Qpid here:
Documentation can be found here:
Make sure the Qpid Python client libraries are on your PYTHONPATH. Extract the archive and add the local directory to your PYTHONPATH:
$ tar -xf qpid-python-VERSION.tar.gz $ cd qpid-python-VERSION $ export PYTHONPATH=$PWD:$PYTHONPATH
Make sure a broker is running.
Run the ‘hello’ example from examples/api:
$ cd examples/api $ ./hello Hello world!
The examples
directory contains sample programs. See examples/README.txt
for more information.
The tests
directory contains a collection of unit tests for the Python client. The tests_0-10
, tests_0-9
, and tests_0-8
directories contain protocol-level conformance tests for brokers that speak the specified AMQP version.
The qpid-python-test
script may be used to run these tests. It will by default run the Python unit tests and the 0-10 conformance tests:
Run a broker on the default port.
Run the tests:
$ ./qpid-python-test
If you wish to run the 0-8 or 0-9 conformence tests, they may be selected as follows:
Run a broker on the default port.
Run the tests:
$ ./qpid-python-test tests_0-8.* [or] $ ./qpid-python-test tests_0-9.*
See the qpid-python-test
command-line help for for additional options:
$ ./qpid-python-test -h
Other Qpid components depend on Qpid Python for testing. You can use setup.py
to install Qpid Python to a standard location:
# User-local install $ python setup.py install --user $ export PYTHONPATH=$HOME/.local/lib/python2.7/site-packages $ export PATH=$HOME/.local/bin:$PATH [or] # System-wide install $ sudo python setup.py install