summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Core Protocol: Add support for flexible versions (#2151)Tincu Gabriel2020-12-021-1/+53
| | | | | | | - Add support for new request and response headers, supporting flexible versions / tagged fields - Add List / Alter partition reassignments APIs - Add support for varints - Add support for compact collections (byte array, string, array)
* Cover sticky assignor's metadata method with tests (#2161)Valeria Chernenko2020-11-051-42/+33
|
* KIP-54: Implement sticky partition assignment strategy (#2057)Valeria Chernenko2020-09-293-19/+883
|
* Feature: delete consumergroups (#2040)Swen Wenzel2020-09-171-1/+77
| | | | | * Add consumergroup related errors * Add DeleteGroups to protocol.admin * Implement delete_groups feature on KafkaAdminClient
* Enhancement for Kafka Admin Client's "Describe Consumer Group" (#2035)Apurva0072020-09-161-2/+100
| | | | | | Adding namedtuples for DescribeConsumerGroup response; Adding Serialization of MemberData and MemberAssignment for the response Co-authored-by: Apurva Telang <atelang@paypal.com> Co-authored-by: Jeff Widman <jeff@jeffwidman.com>
* Add support for `zstd` compression (#2021)Tincu Gabriel2020-09-072-11/+20
|
* Add logic for inferring newer broker versions (#2038)Tincu Gabriel2020-05-051-3/+12
| | | | | | | | | | | | | | * Add logic for inferring newer broker versions - New Fetch / ListOffsets request / response objects - Add new test cases to inferr code based on mentioned objects - Add unit test to check inferred version against whatever resides in KAFKA_VERSION - Add new kafka broker versions to integration list - Add more kafka broker versions to travis task list - Add support for broker version 2.5 id * Implement PR change requests: fewer versions for travis testing, remove unused older versions for inference code, remove one minor version from known server list Do not use newly created ACL request / responses in allowed version lists, due to flexible versions enabling in kafka actually requiring a serialization protocol header update Revert admin client file change
* Implement methods to convert a Struct object to a pythonic object (#1951)Tyler Lubeck2020-02-061-0/+236
| | | Implement methods to convert a Struct object to a pythonic object
* Use ==/!= to compare str, bytes, and int literalsChristian Clauss2020-02-051-1/+1
| | | | | | | | | | | | | | | | | Identity is not the same thing as equality in Python so use ==/!= to compare str, bytes, and int literals. In Python >= 3.8, these instances will raise __SyntaxWarnings__ so it is best to fix them now. https://docs.python.org/3.8/whatsnew/3.8.html#porting-to-python-3-8 % __python__ ``` >>> consumer = "cons" >>> consumer += "umer" >>> consumer == "consumer" True >>> consumer is "consumer" False >>> 0 == 0.0 True >>> 0 is 0.0 False ```
* Optionally return OffsetAndMetadata from consumer.committed(tp) (#1979)Dana Powers2019-12-292-4/+4
|
* Implement __eq__ and __hash__ for ACL objects (#1955)Tyler Lubeck2019-12-291-0/+92
|
* Admin protocol updates (#1948)Tyler Lubeck2019-12-291-0/+18
|
* Style updates to scram sasl supportDana Powers2019-12-291-4/+6
|
* Enable SCRAM-SHA-256 and SCRAM-SHA-512 for sasl (#1918)Swen Wenzel2019-12-295-89/+323
|
* xfail test_describe_configs_topic_resource_returns_configs (Issue #1929)Dana Powers2019-12-281-0/+3
|
* Fix typosCarson Ip2019-11-081-1/+1
|
* Remove SimpleClient, Producer, Consumer, Unittest (#1196)Jeff Widman2019-10-1116-3375/+19
| | | | | | | | | | | | | | | | | | 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`.
* Fix describe config for multi-broker clusters (#1869)Jeppe Andersen2019-10-111-1/+56
| | | | | | | * Fix describe config for multi-broker clusters Currently all describe config requests are sent to "least loaded node". Requests for broker configs must, however, be sent to the specific broker, otherwise an error is returned. Only topic requests can be handled by any node. This changes the logic to send all describe config requests to the specific broker.
* convert test_admin_integration to pytest (#1923)Ulrik Johansson2019-10-073-103/+90
|
* Add KAFKA 2.3.0 to test matrix (#1915)Dana Powers2019-09-302-2/+8
|
* Follow up to PR 1782 -- fix tests (#1914)Dana Powers2019-09-301-3/+2
|
* Issue #1780 - Consumer hang indefinitely in fetcher._retrieve_offsets() due ↵Commander Dishwasher2019-09-301-4/+0
| | | | to topic deletion while rebalancing (#1782)
* Send socket data via non-blocking IO with send buffer (#1912)Dana Powers2019-09-291-1/+3
|
* Do not use wakeup when sending fetch requests from consumer (#1911)Dana Powers2019-09-291-1/+1
|
* Rely on socket selector to detect completed connection attempts (#1909)Dana Powers2019-09-282-2/+2
|
* Skip admin integration tests -- travis fixture issuesDana Powers2019-09-281-4/+7
|
* Fix Admin Client api version checking; only test ACL integration on 0.11+Dana Powers2019-09-281-5/+8
|
* Fixup test_admin_integration test fixturesDana Powers2019-09-281-5/+14
|
* Add ACL api to KafkaAdminClient (#1833)Ulrik Johansson2019-09-282-0/+138
|
* Convert remaining `KafkaConsumer` tests to `pytest` (#1886)Jeff Widman2019-08-224-256/+284
| | | | | | | | 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-2210-142/+65
| | | | | | | | | | | | | 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-218-11/+25
| | | | Remove unused import, whitespace, etc. No functional changes, just cleaning it up so the diffs of later changes are cleaner.
* tests: Use socket.SOCK_STREAM in assertionsIvan A. Melnikov2019-08-151-4/+4
| | | | | | | | | | | socket.SOCK_STREAM is platform specific and on some platforms (most notably on Linux on MIPS) does not equal 1; so it's better to use the constant where appropriate. This change fixes the tests on my MIPS32 LE machine. Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
* Sanity test for consumer.topics() and consumer.partitions_for_topic()Brian Sang2019-06-041-0/+9
|
* Reduce client poll timeout when no ifrsDana Powers2019-05-291-0/+12
|
* Update docs for api_version_auto_timeout_ms (#1812)Jeff Widman2019-05-242-5/+27
| | | | | | | | | 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.
* Remove unused imports (#1808)Jeff Widman2019-05-221-5/+1
|
* Do not call state_change_callback with lock (#1775)Dana Powers2019-04-021-10/+11
|
* Dont treat popped conn.close() as failure in state change callback (#1773)Dana Powers2019-04-011-2/+3
|
* Dont wakeup during maybe_refresh_metadata -- it is only called by poll() (#1769)Dana Powers2019-03-301-2/+2
|
* Fix flaky conn tests that use time.time (#1758)Dana Powers2019-03-211-9/+12
|
* Generate SSL certificates for local testing (#1756)Dana Powers2019-03-211-0/+29
| | | This doesn't fully implement SSL fixtures, but as a first step it should help with automatically generating required certificates / keystores / etc. My hope is that this helps generate more community support for SSL testing!
* Error if connections_max_idle_ms not larger than request_timeout_ms (#1688)Jeff Widman2019-03-141-2/+6
|
* Retry bootstrapping after backoff when necessary (#1736)Dana Powers2019-03-141-45/+23
| | | | | | | The current client attempts to bootstrap once during initialization, but if it fails there is no second attempt and the client will be inoperable. This can happen, for example, if an entire cluster is down at the time a long-running client starts execution. This commit attempts to fix this by removing the synchronous bootstrapping from `KafkaClient` init, and instead merges bootstrap metadata with the cluster metadata. The Java client uses a similar approach. This allows us to continue falling back to bootstrap data when necessary throughout the life of a long-running consumer or producer. Fix #1670
* Mock dns lookups in test_conn (#1739)Dana Powers2019-03-131-1/+8
| | | Small change to avoid doing dns resolution when running local connection tests. This fixture always returns a broker on localhost:9092, so DNS lookups don't make sense here.
* Recheck connecting nodes sooner when refreshing metadata (#1737)Dana Powers2019-03-131-1/+1
|
* Synchronize puts to KafkaConsumer protocol buffer during async sendsDana Powers2019-03-121-4/+24
|
* Do network connections and writes in KafkaClient.poll() (#1729)Dana Powers2019-03-082-8/+8
| | | | | | * Add BrokerConnection.send_pending_requests to support async network sends * Send network requests during KafkaClient.poll() rather than in KafkaClient.send() * Dont acquire lock during KafkaClient.send if node is connected / ready * Move all network connection IO into KafkaClient.poll()
* Use test.fixtures.version not test.conftest.version to avoid warnings (#1731)Dana Powers2019-03-064-8/+4
|
* Fix test_legacy_correct_metadata_response on x86 arch (#1718)Stanislav Levin2019-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the type of required operation result is "long". ``` >>> type(278251978 & 0xffffffff) <type 'long'> ``` However, by default "format" method uses __format__(): ``` >>> (278251978 & 0xffffffff).__format__('') '278251978' ``` So, let's compare things using the same engine: ``` >>> "{!r}".format(278251978 & 0xffffffff) '278251978L' ``` Fixes: https://github.com/dpkp/kafka-python/issues/1717 Signed-off-by: Stanislav Levin <slev@altlinux.org>