@@ -323,7 +323,7 @@ def test_re_auth_all_connections(self, credential_provider):
323
323
}
324
324
mock_pool .get_connection .return_value = mock_connection
325
325
mock_pool ._available_connections = [mock_connection , mock_another_connection ]
326
- mock_pool ._lock = threading .Lock ()
326
+ mock_pool ._lock = threading .RLock ()
327
327
auth_token = None
328
328
329
329
def re_auth_callback (token ):
@@ -382,7 +382,7 @@ def test_re_auth_partial_connections(self, credential_provider):
382
382
mock_another_connection ,
383
383
mock_failed_connection ,
384
384
]
385
- mock_pool ._lock = threading .Lock ()
385
+ mock_pool ._lock = threading .RLock ()
386
386
387
387
def _raise (error : RedisError ):
388
388
pass
@@ -442,7 +442,7 @@ def test_re_auth_pub_sub_in_resp3(self, credential_provider):
442
442
mock_another_connection ,
443
443
]
444
444
mock_pool ._available_connections = [mock_another_connection ]
445
- mock_pool ._lock = threading .Lock ()
445
+ mock_pool ._lock = threading .RLock ()
446
446
auth_token = None
447
447
448
448
def re_auth_callback (token ):
@@ -502,7 +502,7 @@ def test_do_not_re_auth_pub_sub_in_resp2(self, credential_provider):
502
502
mock_another_connection ,
503
503
]
504
504
mock_pool ._available_connections = [mock_another_connection ]
505
- mock_pool ._lock = threading .Lock ()
505
+ mock_pool ._lock = threading .RLock ()
506
506
auth_token = None
507
507
508
508
def re_auth_callback (token ):
@@ -560,7 +560,7 @@ def test_fails_on_token_renewal(self, credential_provider):
560
560
}
561
561
mock_pool .get_connection .return_value = mock_connection
562
562
mock_pool ._available_connections = [mock_connection , mock_another_connection ]
563
- mock_pool ._lock = threading .Lock ()
563
+ mock_pool ._lock = threading .RLock ()
564
564
565
565
Redis (
566
566
connection_pool = mock_pool ,
0 commit comments