summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2019-09-29 17:04:17 -0700
committerGitHub <noreply@github.com>2019-09-29 17:04:17 -0700
commit392d674be6641078717a4d87e471916c9a4bbb22 (patch)
treebaee4165315b4c99939a944a6a7b893f0c17e36b /test
parent9de12d3f03236988a60e6cd79a50ffa5165cf735 (diff)
downloadkafka-python-392d674be6641078717a4d87e471916c9a4bbb22.tar.gz
Send socket data via non-blocking IO with send buffer (#1912)
Diffstat (limited to 'test')
-rw-r--r--test/test_client_async.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_client_async.py b/test/test_client_async.py
index 8bb2028..74da66a 100644
--- a/test/test_client_async.py
+++ b/test/test_client_async.py
@@ -25,6 +25,7 @@ from kafka.structs import BrokerMetadata
@pytest.fixture
def cli(mocker, conn):
client = KafkaClient(api_version=(0, 9))
+ mocker.patch.object(client, '_selector')
client.poll(future=client.cluster.request_update())
return client
@@ -32,6 +33,7 @@ def cli(mocker, conn):
def test_bootstrap(mocker, conn):
conn.state = ConnectionStates.CONNECTED
cli = KafkaClient(api_version=(0, 9))
+ mocker.patch.object(cli, '_selector')
future = cli.cluster.request_update()
cli.poll(future=future)
@@ -86,7 +88,7 @@ def test_maybe_connect(cli, conn):
def test_conn_state_change(mocker, cli, conn):
- sel = mocker.patch.object(cli, '_selector')
+ sel = cli._selector
node_id = 0
cli._conns[node_id] = conn