summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2018-01-11 17:38:47 -0800
committerGitHub <noreply@github.com>2018-01-11 17:38:47 -0800
commita8bf19f88e89bef571b7c1f952010bf405054987 (patch)
tree3c6929c0ab4b8e613a919020baa8d9810de7e0d0 /test
parentda65a562bdd9ce20290d4375acc36b4977ef7026 (diff)
downloadkafka-python-a8bf19f88e89bef571b7c1f952010bf405054987.tar.gz
Honor reconnect_backoff in conn.connect() (#1342)
* Honor reconnect_backoff in conn.connect()
Diffstat (limited to 'test')
-rw-r--r--test/test_conn.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_conn.py b/test/test_conn.py
index ef7925a..5698519 100644
--- a/test/test_conn.py
+++ b/test/test_conn.py
@@ -263,6 +263,7 @@ def test_lookup_on_connect():
]
with mock.patch("socket.getaddrinfo", return_value=mock_return2) as m:
+ conn.last_attempt = 0
conn.connect()
m.assert_called_once_with(hostname, port, 0, 1)
conn.close()
@@ -288,6 +289,7 @@ def test_relookup_on_failure():
]
with mock.patch("socket.getaddrinfo", return_value=mock_return2) as m:
+ conn.last_attempt = 0
conn.connect()
m.assert_called_once_with(hostname, port, 0, 1)
conn.close()