diff options
author | Dana Powers <dana.powers@gmail.com> | 2018-01-11 15:45:35 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2018-01-11 15:45:35 -0800 |
commit | 0906bae646d18a41ff4df3acdc11b2d0b2aaf390 (patch) | |
tree | fa45b01eb8bd8234845c095b1839fcee784b028b /test/test_conn.py | |
parent | ee224e7f08c21983f5712771d35c0eff3948632f (diff) | |
download | kafka-python-backoff_conn_reconnect.tar.gz |
Reset last_attempt in conn connect testsbackoff_conn_reconnect
Diffstat (limited to 'test/test_conn.py')
-rw-r--r-- | test/test_conn.py | 2 |
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() |