File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2038,7 +2038,9 @@ def _send_cluster_commands(
2038
2038
for n in nodes .values ():
2039
2039
n .connection_pool .release (n .connection )
2040
2040
nodes = {}
2041
- if self .retry and isinstance (e , self .retry ._supported_errors ):
2041
+ if self .retry and isinstance (
2042
+ e , self .retry ._supported_errors
2043
+ ):
2042
2044
backoff = self .retry ._backoff .compute (attempts_count )
2043
2045
if backoff > 0 :
2044
2046
time .sleep (backoff )
Original file line number Diff line number Diff line change @@ -2792,9 +2792,11 @@ class TestClusterPipeline:
2792
2792
"""
2793
2793
2794
2794
@pytest .mark .parametrize ("function" , ["write" , "read" ])
2795
- def test_connection_release_with_unexpected_error_in_node_commands (self , r , function ):
2795
+ def test_connection_release_with_unexpected_error_in_node_commands (
2796
+ self , r , function
2797
+ ):
2796
2798
"""
2797
- Test that connection is released to the pool, even with unexpected error in NodeCommands' functions
2799
+ Test that connection is released to the pool, even with an unexpected error
2798
2800
"""
2799
2801
with patch .object (NodeCommands , function ) as m :
2800
2802
You can’t perform that action at this time.
0 commit comments