summaryrefslogtreecommitdiff
path: root/test/testutil.py
Commit message (Collapse)AuthorAgeFilesLines
* Enable SCRAM-SHA-256 and SCRAM-SHA-512 for sasl (#1918)Swen Wenzel2019-12-291-0/+5
|
* Remove SimpleClient, Producer, Consumer, Unittest (#1196)Jeff Widman2019-10-111-105/+0
| | | | | | | | | | | | | | | | | | In the 2.0 release, we're removing: * `SimpleClient` * `SimpleConsumer` * `SimpleProducer` * Old partitioners used by `SimpleProducer`; these are superceded by the `DefaultPartitioner` These have been deprecated for several years in favor of `KafkaClient` / `KafkaConsumer` / `KafkaProducer`. Since 2.0 allows breaking changes, we are removing the deprecated classes. Additionally, since the only usage of `unittest` was in tests for these old Simple* clients, this also drops `unittest` from the library. All tests now run under `pytest`.
* Convert remaining `KafkaConsumer` tests to `pytest` (#1886)Jeff Widman2019-08-221-0/+11
| | | | | | | | This makes it so the only remaining use of `unittest` is in the old tests of the deprecated `Simple*` clients. All `KafkaConsumer` tests are migrated to `pytest`. I also had to bump the test iterations up on one of the tests, I think there was a race condition there that was more commonly hit under pytest , planning to cleanup that in a followup PR. See https://github.com/dpkp/kafka-python/pull/1886#discussion_r316860737 for details.
* Cleanup handling of KAFKA_VERSION env var in tests (#1887)Jeff Widman2019-08-221-65/+13
| | | | | | | | | | | | | Now that we are using `pytest`, there is no need for a custom decorator because we can use `pytest.mark.skipif()`. This makes the code significantly simpler. In particular, dropping the custom `@kafka_versions()` decorator is necessary because it uses `func.wraps()` which doesn't play nice with `pytest` fixtures: - https://github.com/pytest-dev/pytest/issues/677 - https://stackoverflow.com/a/19614807/770425 So this is a pre-requisite to migrating some of those tests to using pytest fixtures.
* Minor test cleanup (#1885)Jeff Widman2019-08-211-2/+2
| | | | Remove unused import, whitespace, etc. No functional changes, just cleaning it up so the diffs of later changes are cleaner.
* Update docs for api_version_auto_timeout_ms (#1812)Jeff Widman2019-05-241-2/+20
| | | | | | | | | The docs for `api_version_auto_timeout_ms` mention setting `api_version='auto'` but that value has been deprecated for years in favor of `api_version=None`. Updating the docs for now, and will remove support for `'auto'` in next major version bump.
* Be explicit with tuples for %s formattingJeff Widman2018-11-181-1/+1
| | | | Fix #1633
* Migrate from `Unittest` to `pytest` (#1620)Jeff Widman2018-11-101-23/+3
|
* Cleanup fixture importsJeff Widman2018-10-271-6/+1
| | | | | | | | | | | | | | | `random_string` now comes from `test.fixtures` and was being transparently imported via `test.testutil` so this bypasses the pointless indirect import. Similarly, `kafka_version` was transparently imported by `test.testutil` from `test.fixtures`. Also removed `random_port()` in `test.testutil` because its unused as its been replaced by the one in `test.fixtures`. This is part of the pytest migration that was started back in a1869c4be5f47b4f6433610249aaf29af4ec95e5.
* Don't use `kafka.common` internally1.3.5Jeff Widman2018-06-051-4/+6
| | | | This finishes the split from `kafka.common` to `kafka.errors`/`kafka.structs`.
* Add codec validators to record parser and builder for all formats (#1447)Taras2018-04-181-2/+5
|
* Fixes racing condition when message is sent to broker before topic logs are ↵Andre Araujo2018-02-211-3/+19
| | | | created
* Introduce new fixtures to prepare for migration to pytest.Andre Araujo2018-02-211-35/+54
| | | | | | | This commits adds new pytest fixtures in prepation for the migration of unittest.TestCases to pytest test cases. The handling of temporary dir creation was also changed so that we can use the pytest tmpdir fixture after the migration.
* Increase some integration test timeouts (#1374)Dana Powers2018-02-081-1/+11
|
* Minor Exception cleanupJeff Widman2017-12-121-1/+1
|
* Spelling and grammar changes (#923)melissacrawford3962017-01-111-1/+1
|
* Update imports from kafka.common -> kafka.errors / kafka.structsDana Powers2016-04-051-1/+1
|
* More fixture logging improvementsDana Powers2016-03-141-3/+0
| | | | | | | | - Add test logging NullHandler - Remove default logging level filtering in testutil - Log render_template info - More fixture logging cleanups - wait_for() should not handle child shutdown
* Move logging format config to tox.ini to avoid duplicate log capture in ↵Dana Powers2016-03-131-2/+0
| | | | pytest output
* Add timestamps to basic test loggingDana Powers2016-03-121-1/+2
|
* Merge branch '0.9'Dana Powers2016-01-071-10/+4
|\ | | | | | | | | | | | | | | Conflicts: kafka/codec.py kafka/version.py test/test_producer.py test/test_producer_integration.py
| * Fix KafkaClient->SimpleClient references0.9Dana Powers2016-01-071-2/+2
| |
| * Move Request / Response logging from KafkaClient to BrokerConnectionDana Powers2015-12-101-3/+0
| | | | | | | | and reenable kafka.conn debug logging in tests
| * Drop kafka_bytestringDana Powers2015-12-101-4/+1
| |
| * Update references to kafka.common Request/Response (now Payload)Dana Powers2015-12-091-2/+2
| |
* | Refactor kafka_versions to support arbitrary operators (> >= < <= ! =)kafka_version_testsDana Powers2015-12-101-4/+38
|/
* Reduce log chatter in tests (only debug kafka.conn in test_conn)Dana Powers2015-06-081-0/+5
|
* Add zk to KafkaIntegrationTestCase attributes to fix lint errorDana Powers2015-06-081-0/+1
|
* Dump fixture logs on OffsetResponse error during producer integrationDana Powers2015-06-081-3/+9
| | | | | tests. This is intended to help debug an intermittent failure that requires server logs.
* random_string helper should return str not bytesDana Powers2015-06-061-3/+2
|
* Make external API consistently support python3 strings for topic.Space2015-04-031-2/+6
|
* Fixed TestKafkaProducerIntegrationLou Marvin Caraig2014-11-261-0/+4
|
* Merge pull request #227 from wizzat-feature/py3Dana Powers2014-09-071-7/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 3 Support Conflicts: kafka/producer.py test/test_client.py test/test_client_integration.py test/test_codec.py test/test_consumer.py test/test_consumer_integration.py test/test_failover_integration.py test/test_producer.py test/test_producer_integration.py test/test_protocol.py test/test_util.py
| * Fix more tests, only multiprocessing consumer ones remainingBruno Renié2014-09-031-2/+2
| |
| * Bytes in self.msg()Bruno Renié2014-09-031-1/+1
| |
| * Encode topic directlyBruno Renié2014-09-031-1/+2
| |
| * Fix bytes interpolationBruno Renié2014-09-031-1/+1
| |
| * Topic in bytesBruno Renié2014-09-031-1/+1
| |
| * Make all unit tests pass on py3.3/3.4Bruno Renié2014-09-031-2/+4
| |
| * Use base unittest or unittest2 depending on python versionBruno Renié2014-09-031-2/+3
|/
* Add pylint to tox.ini; test both kafka and test; default to error-checking ↵Dana Powers2014-08-251-0/+1
| | | | only; fixup errors; skip kafka/queue.py
* Handle New Topic CreationMark Roberts2014-05-221-12/+1
| | | | | Adds ensure_topic_exists to KafkaClient, redirects test case to use that. Fixes #113 and fixes #150.
* Fix Python 2.6 supportMark Roberts2014-04-231-2/+2
|
* Split out kafka version environments, default tox no longer runs any ↵Mark Roberts2014-04-231-5/+12
| | | | integration tests, make skipped integration also skip setupClass, implement rudimentary offset support in consumer.py
* Add test support for multiple versions of kafka. Uncomment first 0.8.1 ↵Mark Roberts2014-04-231-0/+12
| | | | specific test. Add rudimentary (failing) consumer resumption test
* Update fixtures to eliminate extraneous logging on non-errors, split out ↵Mark Roberts2014-04-221-4/+22
| | | | mostly unrelated service.py, fix test in client_integration to use get_open_port, fix unintended import cascade in test_producer_integration
* Finish breaking out integration testsMark Roberts2014-04-171-2/+16
|
* Split up and speed up producer based integration testsMark Roberts2014-04-171-0/+47
|
* Reinstate test_integrate, make test_protocol more explicit, create testutilMark Roberts2014-04-081-0/+10