Skip to content

Instantly share code, notes, and snippets.

@rgs1
Created April 23, 2014 18:07
Show Gist options
  • Save rgs1/11226506 to your computer and use it in GitHub Desktop.
Save rgs1/11226506 to your computer and use it in GitHub Desktop.
diff --git a/kazoo/tests/test_client.py b/kazoo/tests/test_client.py
index 2c7dcd16bf3b..a2c670dac6ea 100644
--- a/kazoo/tests/test_client.py
+++ b/kazoo/tests/test_client.py
@@ -1,3 +1,4 @@
+import socket
import sys
import threading
import time
@@ -222,7 +223,7 @@ class TestConnection(KazooTestCase):
def test_add_auth_on_reconnect(self):
self.client.add_auth("digest", "jsmith:jsmith")
- self.client._connection._socket.close()
+ self.client._connection._socket.shutdown(socket.SHUT_RDWR)
while not self.client.connected:
time.sleep(0.1)
self.assertTrue(("digest", "jsmith:jsmith") in self.client.auth_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment