diff options
| author | Dana Powers <dana.powers@gmail.com> | 2019-09-28 19:30:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-28 19:30:09 -0700 |
| commit | 89bf6a6ee51e8a54f909eae4785d04e485b91198 (patch) | |
| tree | dcecac3f96738699441226c4f4a38f2cedc3632e /test | |
| parent | 5d1d42429e07f4aa2959b488ea76efb6d0bafc79 (diff) | |
| download | kafka-python-89bf6a6ee51e8a54f909eae4785d04e485b91198.tar.gz | |
Rely on socket selector to detect completed connection attempts (#1909)
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_client_async.py | 2 | ||||
| -rw-r--r-- | test/test_conn.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/test_client_async.py b/test/test_client_async.py index 82d1467..8bb2028 100644 --- a/test/test_client_async.py +++ b/test/test_client_async.py @@ -94,7 +94,7 @@ def test_conn_state_change(mocker, cli, conn): sock = conn._sock cli._conn_state_change(node_id, sock, conn) assert node_id in cli._connecting - sel.register.assert_called_with(sock, selectors.EVENT_WRITE) + sel.register.assert_called_with(sock, selectors.EVENT_WRITE, conn) conn.state = ConnectionStates.CONNECTED cli._conn_state_change(node_id, sock, conn) diff --git a/test/test_conn.py b/test/test_conn.py index 6412cb6..966f7b3 100644 --- a/test/test_conn.py +++ b/test/test_conn.py @@ -85,7 +85,7 @@ def test_connection_delay(conn): conn.last_attempt = 1000 assert conn.connection_delay() == conn.config['reconnect_backoff_ms'] conn.state = ConnectionStates.CONNECTING - assert conn.connection_delay() == 0 + assert conn.connection_delay() == float('inf') conn.state = ConnectionStates.CONNECTED assert conn.connection_delay() == float('inf') |
