summaryrefslogtreecommitdiff
path: root/test/test_client_async.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_client_async.py')
-rw-r--r--test/test_client_async.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_client_async.py b/test/test_client_async.py
index 605ef1a..5870501 100644
--- a/test/test_client_async.py
+++ b/test/test_client_async.py
@@ -183,19 +183,22 @@ def test_close(mocker, conn):
cli = KafkaClient()
mocker.patch.object(cli, '_selector')
+ # bootstrap connection should have been closed
+ assert conn.close.call_count == 1
+
# Unknown node - silent
cli.close(2)
# Single node close
cli._maybe_connect(0)
- assert not conn.close.call_count
- cli.close(0)
assert conn.close.call_count == 1
+ cli.close(0)
+ assert conn.close.call_count == 2
# All node close
cli._maybe_connect(1)
cli.close()
- assert conn.close.call_count == 3
+ assert conn.close.call_count == 4
def test_is_disconnected(conn):