diff options
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | tests/conftest.py | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -1,6 +1,6 @@ * 3.1.0 (in development) - * Fixed an issue with retry_on_timeout logic that caused some TimedOut - errors to be retried. Thanks Aaron Yang. #1022/#1023 + * Fixed an issue with retry_on_timeout logic that caused some TimeoutErrors + to be retried. Thanks Aaron Yang. #1022/#1023 * Added support for SNI for SSL. Thanks @oridistor and Roey Prat. #1087 * Fixed ConnectionPool repr for pools with no connections. Thanks Cody Scott. #1043/#995 diff --git a/tests/conftest.py b/tests/conftest.py index 6e046f2..b5d0762 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,7 +26,12 @@ def _get_client(cls, request=None, **kwargs): client.flushdb() if request: def teardown(): - client.flushdb() + try: + client.flushdb() + except redis.ConnectionError: + # handle cases where a test disconnected a client + # just manually retry the flushdb + client.flushdb() client.connection_pool.disconnect() request.addfinalizer(teardown) return client |
