Skip to content

Commit f55e0bc

Browse files
committed
Fixed broken tests
1 parent 94edf9c commit f55e0bc

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/test_asyncio/test_connection.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,11 @@ async def test_client_do_not_retry_write_on_read_failure(mock_connection, mock_p
328328
mock_pool.get_connection.return_value = mock_connection
329329
mock_pool.connection_kwargs = {}
330330

331-
r = Redis(connection_pool=mock_pool, retry=Retry(ExponentialBackoff(), 3))
331+
r = Redis(
332+
connection_pool=mock_pool,
333+
retry=Retry(ExponentialBackoff(), 3),
334+
single_connection_client=True,
335+
)
332336
await r.set("key", "value")
333337

334338
# If read from socket fails, writes won't be executed.
@@ -354,7 +358,11 @@ async def test_pipeline_immediate_do_not_retry_write_on_read_failure(
354358
mock_pool.get_connection.return_value = mock_connection
355359
mock_pool.connection_kwargs = {}
356360

357-
r = Redis(connection_pool=mock_pool, retry=Retry(ExponentialBackoff(), 3))
361+
r = Redis(
362+
connection_pool=mock_pool,
363+
retry=Retry(ExponentialBackoff(), 3),
364+
single_connection_client=True,
365+
)
358366
pipe = r.pipeline(transaction=False)
359367
await pipe.immediate_execute_command("SET", "key", "value")
360368

0 commit comments

Comments
 (0)