summaryrefslogtreecommitdiff
path: root/test/test_failover_integration.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove SimpleClient, Producer, Consumer, Unittest (#1196)Jeff Widman2019-10-111-240/+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`.
* Cleanup handling of KAFKA_VERSION env var in tests (#1887)Jeff Widman2019-08-221-2/+2
| | | | | | | | | | | | | 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.
* Cleanup fixture importsJeff Widman2018-10-271-2/+2
| | | | | | | | | | | | | | | `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.
* Stop shadowing `ConnectionError`Jeff Widman2018-05-231-3/+3
| | | | | | | | | | In Python3, `ConnectionError` is a native exception. So rename our custom one to `KafkaConnectionError` to prevent accidentally shadowing the native one. Note that there are still valid uses of `ConnectionError` in this code. They already expect a native Python3 `ConnectionError`, and also already handle the Python2 compatibility issues.
* Change SimpleProducer to use async_send (async is reserved in py37) (#1454)Dana Powers2018-03-231-4/+4
|
* Introduce new fixtures to prepare for migration to pytest.Andre Araujo2018-02-211-2/+1
| | | | | | | 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.
* Minor Exception cleanupJeff Widman2017-12-121-1/+1
|
* Fix typosJeff Widman2016-11-141-1/+1
|
* Speedup some failover tests w/ shorter SimpleClient timeoutDana Powers2016-04-081-1/+1
|
* Catch more producer exceptions in failover testsDana Powers2016-04-061-3/+6
|
* Update imports from kafka.common -> kafka.errors / kafka.structsDana Powers2016-04-051-3/+3
|
* Support setting kafka instance port explicitly in fixtureDana Powers2016-02-151-2/+5
|
* Merge branch '0.9'Dana Powers2016-01-071-8/+9
|\ | | | | | | | | | | | | | | Conflicts: kafka/codec.py kafka/version.py test/test_producer.py test/test_producer_integration.py
| * Fix KafkaClient->SimpleClient references0.9Dana Powers2016-01-071-3/+3
| |
| * Use 2-second KafkaClient timeout in failover testsDana Powers2016-01-031-1/+1
| |
| * Catch and retry on RequestTimedOutError in producer failover testDana Powers2015-12-291-2/+4
| |
| * Rename TopicAndPartition -> TopicPartitionDana Powers2015-12-281-2/+2
| |
| * Drop kafka_bytestringDana Powers2015-12-101-3/+2
| |
* | Retry on FailedPayloadsError from consumer.pending() in failover testsDana Powers2015-12-181-4/+5
| |
* | Refactor kafka_versions to support arbitrary operators (> >= < <= ! =)kafka_version_testsDana Powers2015-12-101-8/+2
|/
* Use at_least=True when counting messages in leader failover testsDana Powers2015-06-101-1/+4
|
* Retry failed messages in failover integration tests; use module loggerDana Powers2015-06-101-12/+17
|
* Test failover integration with 3-brokers / replicas / partitionsDana Powers2015-06-091-3/+3
|
* Produce messages to both partitions in async producer leader switch testDana Powers2015-06-081-1/+9
|
* Import style nits in integration testsDana Powers2015-06-081-2/+1
|
* try to fix uncaught FailedPayloadsErrorreAsOn20102015-06-091-0/+8
|
* Encode random_message strings to bytes in test_failover_integrationDana Powers2015-06-061-1/+2
|
* Sleep for 500ms before retrying consumer pending call in testsDana Powers2015-06-061-0/+1
|
* Include message number in sent message value in _send_random_messageDana Powers2015-06-061-1/+1
|
* add option to check for at-least-once message delivery in failover testsDana Powers2015-06-061-6/+12
|
* Reenable test_switch_leader_asyncDana Powers2015-06-061-7/+13
|
* random_string helper should return str not bytesDana Powers2015-06-061-7/+7
|
* Make external API consistently support python3 strings for topic.Space2015-04-031-2/+3
|
* Fetch previously committed offsets in base consumer class so long asDana Powers2015-03-301-1/+1
| | | | | | | | a group is configured (but document that group must be None for old servers). This fixes multiprocessor consumer issue that prevented access to commit offsets if auto_commit is disabled. Also refactor fetch_last_known_offsets based on KafkaConsumer While still setting unknown offsets to 0
* Add more comments to test_switch_leader regarding req_acks policyDana Powers2015-02-091-3/+10
|
* Write a test for issue 313 - keyed producer failoverDana Powers2015-02-091-0/+40
|
* use setUp / tearDown to rebuild fixtures for each test in ↵Dana Powers2015-02-091-12/+12
| | | | test_failover_integration
* Merge conflict w/ assertEqual (assertEquals deprecated)Dana Powers2014-12-151-1/+1
|
* Separate consumers/producers/partitionersDana Powers2014-09-101-1/+1
|
* Merge pull request #227 from wizzat-feature/py3Dana Powers2014-09-071-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| |
| * Make all unit tests pass on py3.3/3.4Bruno Renié2014-09-031-2/+2
| |
| * Use base unittest or unittest2 depending on python versionBruno Renié2014-09-031-2/+2
| |
* | Cleanup tests: no more import *; remove unusedDana Powers2014-09-041-7/+4
| |
* | Another attempt to fix failover test flappingDana Powers2014-09-041-16/+23
| |
* | Import cleanups in testsDana Powers2014-09-041-4/+7
|/
* just fixing a silly except formatting mistakeZack Dever2014-08-291-1/+1
|
* Fixup producer failover tests to avoid consumer message count flapDana Powers2014-08-271-7/+8
| | | | | check message counts via consumer.pending() (OffsetRequest) rather than relying on consumer message iterator (FetchRequest)
* Improve leader failover tests; note that async produce failover is broken -- ↵Dana Powers2014-08-261-45/+67
| | | | so skip that test for now
* Fix Python 2.6 supportMark Roberts2014-04-231-1/+0
|