@@ -323,7 +323,7 @@ def test_re_auth_all_connections(self, credential_provider):
323323 }
324324 mock_pool .get_connection .return_value = mock_connection
325325 mock_pool ._available_connections = [mock_connection , mock_another_connection ]
326- mock_pool ._lock = threading .Lock ()
326+ mock_pool ._lock = threading .RLock ()
327327 auth_token = None
328328
329329 def re_auth_callback (token ):
@@ -382,7 +382,7 @@ def test_re_auth_partial_connections(self, credential_provider):
382382 mock_another_connection ,
383383 mock_failed_connection ,
384384 ]
385- mock_pool ._lock = threading .Lock ()
385+ mock_pool ._lock = threading .RLock ()
386386
387387 def _raise (error : RedisError ):
388388 pass
@@ -442,7 +442,7 @@ def test_re_auth_pub_sub_in_resp3(self, credential_provider):
442442 mock_another_connection ,
443443 ]
444444 mock_pool ._available_connections = [mock_another_connection ]
445- mock_pool ._lock = threading .Lock ()
445+ mock_pool ._lock = threading .RLock ()
446446 auth_token = None
447447
448448 def re_auth_callback (token ):
@@ -502,7 +502,7 @@ def test_do_not_re_auth_pub_sub_in_resp2(self, credential_provider):
502502 mock_another_connection ,
503503 ]
504504 mock_pool ._available_connections = [mock_another_connection ]
505- mock_pool ._lock = threading .Lock ()
505+ mock_pool ._lock = threading .RLock ()
506506 auth_token = None
507507
508508 def re_auth_callback (token ):
@@ -560,7 +560,7 @@ def test_fails_on_token_renewal(self, credential_provider):
560560 }
561561 mock_pool .get_connection .return_value = mock_connection
562562 mock_pool ._available_connections = [mock_connection , mock_another_connection ]
563- mock_pool ._lock = threading .Lock ()
563+ mock_pool ._lock = threading .RLock ()
564564
565565 Redis (
566566 connection_pool = mock_pool ,
0 commit comments