Skip to content

Commit 1fd8a1c

Browse files
committed
remove test for pipeline
1 parent 2daefb8 commit 1fd8a1c

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

redis/sentinel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ def cleanup(self, **options):
261261
"""
262262
Remove the SCAN ITER family command's request id from the dictionary
263263
"""
264-
breakpoint()
265264
self._iter_req_id_to_replica_address.pop(
266265
options.get("iter_req_id", None), None
267266
)

tests/test_sentinel_managed_connection.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -222,23 +222,3 @@ def test_scan_iter_in_redis_cleans_up(
222222
# end of the SCAN ITER command
223223
assert not connection_pool_replica_mock._iter_req_id_to_replica_address
224224

225-
def test_scan_iter_in_pipeline_cleans_up(
226-
connection_pool_replica_mock: SentinelConnectionPool,
227-
):
228-
"""Test that connection pool is correctly cleaned up"""
229-
from redis import Redis
230-
231-
from redis.commands.core import ScanCommands
232-
233-
r = Redis(connection_pool=connection_pool_replica_mock)
234-
r.pipeline()
235-
r.scan_iter("a")
236-
# Patch the actual sending and parsing response from the Connection object
237-
# but still let the connection pool does all the necessary work
238-
with mock.patch.object(r, "_send_command_parse_response", return_value=(0, [])):
239-
r.execute()
240-
[k for k in r.scan_iter("a")]
241-
# Test that the iter_req_id for the scan command is cleared at the
242-
# end of the SCAN ITER command
243-
assert not connection_pool_replica_mock._iter_req_id_to_replica_address
244-

0 commit comments

Comments
 (0)