THRIFT-5777: python fix mismatched timeout exceptions
Client: ["python"]
diff --git a/lib/py/test/test_sslsocket.py b/lib/py/test/test_sslsocket.py
index a5ea06a..2cbf5f8 100644
--- a/lib/py/test/test_sslsocket.py
+++ b/lib/py/test/test_sslsocket.py
@@ -19,6 +19,7 @@
import inspect
import logging
+import time
import os
import platform
import ssl
@@ -76,7 +77,9 @@
try:
self._client = self._server.accept()
if self._client:
- self._client.read(5) # hello
+ data = self._client.read(5) # hello/sleep
+ if data == b"sleep":
+ time.sleep(2)
self._client.write(b"there")
except Exception:
logging.exception('error on server side (%s):' % self.name)