Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup of testing doc #1613

Merged
merged 1 commit into from
Oct 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions docs/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ fixtures for client / consumer / producer testing.
Unit tests
------------------

To run the tests locally, install tox -- `pip install tox`
See https://tox.readthedocs.io/en/latest/install.html
To run the tests locally, install tox:

.. code:: bash

pip install tox

For more details, see https://tox.readthedocs.io/en/latest/install.html

Then simply run tox, optionally setting the python environment.
If unset, tox will loop through all environments.
Expand All @@ -49,8 +54,8 @@ Integration tests

.. code:: bash

KAFKA_VERSION=0.10.1.1 tox -e py27
KAFKA_VERSION=0.8.2.2 tox -e py35
KAFKA_VERSION=0.8.2.2 tox -e py27
KAFKA_VERSION=1.0.1 tox -e py36


Integration tests start Kafka and Zookeeper fixtures. This requires downloading
Expand All @@ -60,25 +65,24 @@ kafka server binaries:

./build_integration.sh

By default, this will install 0.8.2.2, 0.9.0.1, 0.10.1.1, and
0.10.2.1 brokers into the servers/ directory. To install a specific version,
e.g., set `KAFKA_VERSION=0.10.2.1`:
By default, this will install the broker versions listed in build_integration.sh's `ALL_RELEASES`
into the servers/ directory. To install a specific version, set the `KAFKA_VERSION` variable:

.. code:: bash

KAFKA_VERSION=0.10.2.1 ./build_integration.sh
KAFKA_VERSION=1.0.1 ./build_integration.sh

Then run the tests against supported Kafka versions, simply set the `KAFKA_VERSION`
Then to run the tests against a specific Kafka version, simply set the `KAFKA_VERSION`
env variable to the server build you want to use for testing:

.. code:: bash

KAFKA_VERSION=0.10.2.1 tox -e py27
KAFKA_VERSION=1.0.1 tox -e py36

To test against the kafka source tree, set KAFKA_VERSION=trunk
[optionally set SCALA_VERSION (defaults to 2.10)]
[optionally set SCALA_VERSION (defaults to the value set in `build_integration.sh`)]

.. code:: bash

SCALA_VERSION=2.11 KAFKA_VERSION=trunk ./build_integration.sh
KAFKA_VERSION=trunk tox -e py35
SCALA_VERSION=2.12 KAFKA_VERSION=trunk ./build_integration.sh
KAFKA_VERSION=trunk tox -e py36