You must build and install qpid-interop-test before you can run the tests.
By default, qpid-interop-test will install to /usr/local, but you can set any non-priviedged directory as the install prefix using the CMAKE_INSTALL_PREFIX environment variable, for example $HOME/install.
The following tools are needed to build qpid-interop-test:
The following Qpid components must be installed before you build and install qpid-interop-test:
The following are not required, but if installed and present, will be tested:
Pre-requisites can be installed using the standard system package manager (yum, dnf, apt-get etc.) OR built from source and installed.
These are the install steps:
Currently RHEL6 is not supported because it uses Python 2.6.x, and the test code uses features of Python 2.7.x. This may be supported in a future release.
From a clean install:
yum install cmake maven java-1.8.0-openjdk-devel perl-XML-XPath
Some packages will need to be downloaded from EPEL. To set up the EPEL repo in yum:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install epel-release-latest-7.noarch.rpm
then install the following packages:
yum install jsoncpp-devel nodejs-rhea qpid-proton-cpp-devel python-qpid-proton
All packages are available directly from the Fedora repositories:
dnf install gcc-c++ cmake maven java-1.8.0-openjdk-devel perl-XML-XPath jsoncpp-devel nodejs-rhea qpid-proton-cpp-devel python-qpid-proton
Docker images come with only the bare essentials, so there is more to install than a standard bare-metal install:
yum -y install vim unzip wget git gcc-c++ make cmake maven swig java-1.8.0-openjdk-devel perl-XML-XPath python-devel
Some packages will need to be downloaded from EPEL. To set up the EPEL repo in yum:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install epel-release-latest-7.noarch.rpm
then install the following packages:
yum -y install mono-devel python34-devel jsoncpp-devel nodejs-rhea qpid-proton-cpp-devel python-qpid-proton
(TODO)
Qpid-interop-test requires a running broker to be available. This may be on localhost as a local install or build, or on another machine, in which case its IP addresss must be known. Some local broker install options are:
Download from Apache.
Make the following changes to the activemq.xml
config file: For XML element broker.transportConnectors.transportConnector@name="amqp"
add the attribute wireFormat.allowNonSaslConnections=true
. ie:
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=1048576000&wireFormat.allowNonSaslConnections=true"/>
Download from Apache.
yum install qpid-cpp-server
and set the configuration file in /etc/qpid/qpidd.conf as follows:
auth=no queue-patterns=qit
yum install qpid-dispatch-router
and add the following to the config file in /etc/qpid-dispatch/qdrouterd.conf:
listener { host: ::1 port: amqp authenticatePeer: no saslMechanisms: ANONYMOUS }
Qpid Proton is available as a package. However, this can only contain either Python2 OR Python3 bindings. Because QIT tests the Python2 and Python3 bindings against each other as separate clients, we need both clients at the same time. Currently, there is no “official” install method to do this.
To work around this, QIT relies on the following installation locations for the Python client bindings:
Python2:
${CMAKE_INSTALL_PREFIX}/lib64/proton/bindings/python
and Python3:
${CMAKE_INSTALL_PREFIX}/lib64/proton/bindings/python3
To build for both clients, the follow the following steps:
git clone https://git-wip-us.apache.org/repos/asf/qpid-proton.git
Use the following script to build Qpid Proton into a local install directory:
#!/bin/bash PWD=`pwd` REDHAT_DIR=${HOME} BUILD_DIR=${REDHAT_DIR}/qpid-proton/build INSTALL_DIR=${REDHAT_DIR}/install PY2_INSTALL_DIR=${INSTALL_DIR}/lib64/proton/bindings/python CMAKE_PY2_EXECUTABLE=/usr/bin/python CMAKE_PY2_INCLUDE_DIR=/usr/include/python2.7 CMAKE_PY2_LIBRARY=/usr/lib64/libpython2.7.so PY3_INSTALL_DIR=${INSTALL_DIR}/lib64/proton/bindings/python3 CMAKE_PY3_EXECUTABLE=/usr/bin/python3.6m CMAKE_PY3_INCLUDE_DIR=/usr/include/python3.6m CMAKE_PY3_LIBRARY=/usr/lib64/libpython3.6m.so rm -rf ${PY2_INSTALL_DIR} ${PY3_INSTALL_DIR} mkdir -p ${BUILD_DIR} cd ${BUILD_DIR} # First build under Python 3 cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_PYTHON="ON" -DPYTHON_EXECUTABLE=${CMAKE_PY3_EXECUTABLE} -DPYTHON_INCLUDE_DIR=${CMAKE_PY3_INCLUDE_DIR} -DPYTHON_LIBRARY=${CMAKE_PY3_LIBRARY} .. make install mv ${PY2_INSTALL_DIR} ${PY3_INSTALL_DIR} # Now build under Python 2 cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_PYTHON="ON" -DPYTHON_EXECUTABLE=${CMAKE_PY2_EXECUTABLE} -DPYTHON_INCLUDE_DIR=${CMAKE_PY2_INCLUDE_DIR} -DPYTHON_LIBRARY=${CMAKE_PY2_LIBRARY} .. make install cd ${PWD} echo echo "Checking Python libs built:" ls -l --color=auto ${INSTALL_DIR}/lib64/proton/bindings/python*/_cproton.so echo "done"
NOTE:
CMAKE_PY3_EXECUTABLE=/usr/bin/python3.4m CMAKE_PY3_INCLUDE_DIR=/usr/include/python3.4m CMAKE_PY3_LIBRARY=/usr/lib64/libpython3.4m.so
If the script builds and installs successfully, you should see the following at the end:
Checking Python libs built: -rwxr-xr-x. 1 kvdr kvdr 1608536 Feb 27 21:00 /home/kvdr/RedHat/install/lib64/proton/bindings/python/_cproton.so -rwxr-xr-x. 1 kvdr kvdr 1609328 Feb 27 21:00 /home/kvdr/RedHat/install/lib64/proton/bindings/python3/_cproton.so done
Qpid-interop-test may be installed locally (preferred for local builds) or to the system (which requires root privileges). For a local install, use the -DCMAKE_INSTALL_PREFIX
option to the cmake
command. If it is omitted, then qpid-interop-test will be installed into the default system directories. The source may be unpacked, or (if you need to use the latest and greatest), cloned from git:
git clone https://git-wip-us.apache.org/repos/asf/qpid-interop-test.git
Assuming the source tree is located in directory qpid-interop-test:
cd qpid-interop-test mkdir build cd build
For a local install:
cmake -DCMAKE_INSTALL_PREFIX=<abs-path-to-local-install-dir> .. make install
For a system install, root privileges are required:
cmake .. make sudo make install
The config.sh script is in the qpid-interop-test build directory:
source build/config.sh
If the broker is at a remote location rather than localhost, the IP address must be known. In tests using the Qpid Dispatch Router, then the entire broker network must be running before the tests are run. The IP addresses of the sender (the broker to which messages are being sent) and receiver (the broker from which messages will be received) must be known.
The available tests are:
Module | Description | Clients |
---|---|---|
amqp_large_content_test | Tests implementation of large messages up to 10MB | C++ Python AMQP.NetLite |
amqp_types_test | Tests the implementation of AMQP 1.0 types | C++ Python Rhea AMQP.NetLite |
jms_hdrs_props_test | Tests JMS headers and properties | C++ JMS Python |
jms_messages_test | Tests all JMS message types (except ObjectMessage) | C++ JMS Python |
The preferred method to run the tests is using the Python module option as follows:
python -m qpid_interop_test.amqp_types_test python -m qpid_interop_test.jms_messages_test ...
If the broker is remote, use the following to point to the broker(s):
python -m qpid_interop_test.amqp_types_test --sender <broker-ip-addr> --receiver <broker-ip-addr> python -m qpid_interop_test.jms_messages_test --sender <broker-ip-addr> --receiver <broker-ip-addr> ...
In tests using the Qpid dispatch router, a multi-node configuration may be set up such that messages are sent to a different broker to that from which they will be received. For example, to send to broker A and receive from broker B:
python -m qpid_interop_test.amqp_types_test --sender <broker-ip-addr-A> --receiver <broker-ip-addr-B> python -m qpid_interop_test.jms_messages_test --sender <broker-ip-addr-A> --receiver <broker-ip-addr-B> ...