interceptor_test
java
plugin_test
.gitignore
0000-unittests.c
0001-multiobj.c
0002-unkpart.c
0003-msgmaxsize.c
0004-conf.c
0005-order.c
0006-symbols.c
0007-autotopic.c
0008-reqacks.c
0011-produce_batch.c
0012-produce_consume.c
0013-null-msgs.c
0014-reconsume-191.c
0015-offset_seeks.c
0017-compression.c
0018-cgrp_term.c
0019-list_groups.c
0020-destroy_hang.c
0021-rkt_destroy.c
0022-consume_batch.c
0025-timers.c
0026-consume_pause.c
0028-long_topicnames.c
0029-assign_offset.c
0030-offset_commit.c
0031-get_offsets.c
0033-regex_subscribe.c
0034-offset_reset.c
0035-api_version.c
0036-partial_fetch.c
0037-destroy_hang_local.c
0038-performance.c
0039-event.c
0040-io_event.c
0041-fetch_max_bytes.c
0042-many_topics.c
0043-no_connection.c
0044-partition_cnt.c
0045-subscribe_update.c
0046-rkt_cache.c
0047-partial_buf_tmout.c
0048-partitioner.c
0049-consume_conn_close.c
0050-subscribe_adds.c
0051-assign_adds.c
0052-msg_timestamps.c
0053-stats_cb.cpp
0054-offset_time.cpp
0055-producer_latency.c
0056-balanced_group_mt.c
0057-invalid_topic.cpp
0058-log.cpp
0059-bsearch.cpp
0060-op_prio.cpp
0061-consumer_lag.cpp
0062-stats_event.c
0063-clusterid.cpp
0064-interceptors.c
0065-yield.cpp
0066-plugins.cpp
0067-empty_topic.cpp
0068-produce_timeout.c
0069-consumer_add_parts.c
0070-null_empty.cpp
0072-headers_ut.c
0073-headers.c
0074-producev.c
0075-retry.c
0076-produce_retry.c
0077-compaction.c
0078-c_from_cpp.cpp
0079-fork.c
0081-fetch_max_bytes.cpp
1000-unktopic.c
8000-idle.cpp
CMakeLists.txt
LibrdkafkaTestApp.py
Makefile
README
librdkafka.suppressions
sockem.c
sockem.h
test.c
test.conf.example
test.h
testcpp.cpp
testcpp.h
testshared.h
xxxx-assign_partition.c
xxxx-metadata.cpp
broker_version_tests.py
buildbox.sh
cleanup-checker-tests.sh
cluster_testing.py
delete-test-topics.sh
gen-ssl-certs.sh
interactive_broker_version.py
lz4_manual_test.sh
multi-broker-version-test.sh
performance_plot.py
run-test.sh
sasl_test.py
until-fail.sh
README
Automated regression tests for librdkafka
=========================================


Using trivup to bring up a cluster
----------------------------------

    make trunk

or:

   ./interactive_broker_version.py trunk
   make


Old way using an existing cluster
--------------------------------
A local configuration file needs to be created to specify the broker address,
and possibly other rdkafka configuration properties:

    cp test.conf.example test.conf
    $EDITOR test.conf


Run specific tests
------------------

To run tests:

   # Run tests in parallel (quickest, but harder to troubleshoot)
   make

   # Run tests in sequence
   make run_seq

   # Run specific test
   TESTS=0004 make

   # Run test(s) with helgrind, valgrind, gdb
   TESTS=0009 ./run-test.sh ./merged valgrind|helgrind|gdb


All tests in the 0000-0999 series are run automatically with 'make'.

Tests 1000-1999 are subject to specific non-standard setups or broker
configuration, these tests are run with "TESTS=1xxx-yyyyy.test make".
See comments in the test's source file for specific requirements.


To insert test results into SQLite database make sure the 'sqlite3' utility
is installed, then add this to test.conf:

test.sql.command=sqlite3 rdktests



Automated broker cluster setup using trivup
===========================================

A local broker cluster can be set up using
[trivup](https://github.com/edenhill/trivup).
These self-contained clusters are used to run the librdkafka test suite
on a number of different broker versions or with specific broker configs.

trivup is a python package, either check out and install it
using `python setup.py install` in your virtualenv or grab it from PyPi.

The following sections rely on trivup being installed.


Compatbility tests with multiple broker versions
================================================

To ensure compatibility across all supported broker versions the entire
test suite is run in a trivup based cluster, one test run for each
relevant broker version.

 `./broker_version_tests.py`




SASL tests
==========

Testing SASL requires a bit of configuration on the brokers, to automate
this the entire test suite is run on a trivup based cluster.

 `./sasl_tests.py`



Full test suite(s) run
======================

To run all tests, including the broker version and SASL tests, etc, use

 `make full`

**NOTE**: Passing the full test run is a prerequisite to
          checking in any code / filing a PR.



Manual testing notes
====================

The following manual tests are currently performed manually, they should be
implemented as automatic tests.

LZ4 interop
-----------

 `./interactive_broker_version.py -c ./lz4_manual_test.py 0.8.2.2 0.9.0.1 trunk`

 Check the output and follow the instructions.



Trivup root path
================

The trivup download and run-time root defaults to 'tmp' (in current directory),
the interactive_broker_version.py script takes a '-root <dir>' option and
all trivup based scripts (in tests/) honour the TRIVUP_ROOT environment
variable.


Test numbers
============
Automated tests: 0000-0999
Manual tests:    8000-8999