summaryrefslogtreecommitdiff
path: root/test/test_conn.py
Commit message (Collapse)AuthorAgeFilesLines
* Rely on socket selector to detect completed connection attempts (#1909)Dana Powers2019-09-281-1/+1
|
* Minor test cleanup (#1885)Jeff Widman2019-08-211-1/+0
| | | | 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>
* Fix flaky conn tests that use time.time (#1758)Dana Powers2019-03-211-9/+12
|
* 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.
* Synchronize puts to KafkaConsumer protocol buffer during async sendsDana Powers2019-03-121-4/+24
|
* Don't use `kafka.common` internally1.3.5Jeff Widman2018-06-051-1/+1
| | | | This finishes the split from `kafka.common` to `kafka.errors`/`kafka.structs`.
* Stop shadowing `ConnectionError`Jeff Widman2018-05-231-2/+2
| | | | | | | | | | 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.
* Connect with sockaddrs to support non-zero ipv6 scope ids (#1433)Dana Powers2018-03-091-15/+12
|
* Make BrokerConnection .host / .port / .afi immutable, use _sock_* attributes ↵Dana Powers2018-03-091-9/+20
| | | | for current lookups (#1422)
* Fix BrokerConnection.connection_delay() to return milliseconds (#1414)Dana Powers2018-03-081-0/+9
|
* Honor reconnect_backoff in conn.connect() (#1342)Dana Powers2018-01-111-0/+2
| | | * Honor reconnect_backoff in conn.connect()
* Refactor dns lookup in BrokerConnection (#1312)Dana Powers2017-12-081-0/+25
|
* Stop using mutable types for default arg values1212-stop-using-mutable-types-for-default-arg-valuesJeff Widman2017-09-121-1/+1
| | | | | | | | Using mutable types for default args is typically a no-no unless their surprising behavior is being explicitly abused, for an explanation see: http://effbot.org/zone/default-values.htm Fix #1212
* Derive all api classes from Request / Response base classes (#1030)Dana Powers2017-03-141-2/+3
|
* Drop bad disconnect test -- just use the mocked-socket test (#982)Dana Powers2017-02-241-27/+1
|
* When hostname lookup is necessary, do every connect (#812)Evan Bender2016-11-201-0/+28
| | | | | Fixes a bug where lookup was done only once for the whole life of the process -- if a broker's IP changed, client couldn't reconnect.
* Rearrange connection tests to separate legacy KafkaConnectionDana Powers2016-06-041-9/+57
|
* Add disconnected socket tests for conn.recv()Dana Powers2016-04-251-1/+46
|
* Rename mocked socket as _socket in test_connDana Powers2016-04-251-18/+16
|
* Cleanup AF_INET import in conn fixturefrench_connectionDana Powers2016-04-071-1/+1
|
* Use version-indexed lists for request/response protocol structsprotocol_versionsDana Powers2016-04-051-3/+3
|
* Add BrokerConnection.send testsDana Powers2016-04-051-9/+102
|
* Add basic unit test coverage for BrokerConnectionDana Powers2016-04-041-0/+82
|
* Move old KafkaConnection tests to test_conn_legacyDana Powers2016-04-041-242/+0
|
* Kafka IPv6 Support.Tim Evens2016-03-301-6/+23
| | | | | | IPv6 address without port can be defined as the IPv6 address. If the address is a hostname or if a port is included, then the address MUST be wrapped in brackets [] (E.g. [somehost]:1234 or [fd00:1001::2]:1234).
* Move Request / Response logging from KafkaClient to BrokerConnectionDana Powers2015-12-101-18/+0
| | | | and reenable kafka.conn debug logging in tests
* Add tests. Bug fix. Rename socket_conn dict.Enrico Canzonieri2015-11-101-0/+17
|
* Reset kafka.conn logger level in tearDownDana Powers2015-06-091-0/+13
|
* Reduce log chatter in tests (only debug kafka.conn in test_conn)Dana Powers2015-06-081-0/+5
|
* Returned original tests, rm dirty flag, name fixesViktor Shlapakov2015-02-251-0/+44
|
* Merge conflict w/ assertEqual (assertEquals deprecated)Dana Powers2014-12-151-3/+3
|
* Merge pull request #227 from wizzat-feature/py3Dana Powers2014-09-071-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Make all unit tests pass on py3.3/3.4Bruno Renié2014-09-031-4/+4
| |
| * 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-2/+2
|/
* Add pylint to tox.ini; test both kafka and test; default to error-checking ↵Dana Powers2014-08-251-9/+9
| | | | only; fixup errors; skip kafka/queue.py
* Add a mock to sock.recv() in the test_conn setUp method. Returns 2 packet ↵Dana Powers2014-08-191-61/+25
| | | | payloads, then '', then error
* Fix test_conn tests wrt _dirty / _sockDana Powers2014-08-191-9/+4
|
* Remove unused imports from test/test_conn.pyDana Powers2014-08-191-2/+0
|
* Implement last of the skipped test_conn.py testsDana Powers2014-08-191-2/+18
|
* Implement a few more skipped tests in test/test_conn.pyDana Powers2014-08-191-4/+19
|
* Move common connection testing code to setUp methodDana Powers2014-08-191-98/+45
|
* Implementing more skipped connection tests (send and recv)Dana Powers2014-08-191-6/+82
|
* Cleanup some connection tests in test/test_conn.pyDana Powers2014-08-191-14/+11
|
* Improve KafkaConnection testing: mock socket.create_connection; add tests ↵Dana Powers2014-08-191-8/+95
| | | | for __init__ and send
* Fix Python 2.6 supportMark Roberts2014-04-231-10/+10
|
* Split test files, modify test_protocolMark Roberts2014-04-081-4/+0
|
* Remove test support for py26 since it's brokenMark Roberts2014-04-071-0/+73