Skip to content

Commit 080518a

Browse files
committed
convert ConnectionsIndexer to list before indexing
1 parent 470964e commit 080518a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/test_asyncio/test_connection_pool.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def test_do_not_auto_disconnect_redis_created_pool(self, r2: redis.Redis):
5757
assert r2.connection_pool._in_use_connections == {new_conn}
5858
assert new_conn.is_connected
5959
assert len(r2.connection_pool._available_connections) == 1
60-
assert r2.connection_pool._list(available_connections)[0].is_connected
60+
assert r2.connection_pool.list(available_connections)[0].is_connected
6161

6262
async def test_auto_release_override_true_manual_created_pool(self, r: redis.Redis):
6363
assert r.auto_close_connection_pool is True, "This is from the class fixture"
@@ -85,7 +85,7 @@ async def test_negate_auto_close_client_pool(
8585
await r.aclose(close_connection_pool=False)
8686
assert not self.has_no_connected_connections(r.connection_pool)
8787
assert r.connection_pool._in_use_connections == {new_conn}
88-
assert r.connection_pool._list(available_connections)[0].is_connected
88+
assert r.connection_pool.list(available_connections)[0].is_connected
8989
assert self.get_total_connected_connections(r.connection_pool) == 2
9090

9191

@@ -579,7 +579,7 @@ async def test_on_connect_error(self):
579579
await bad_connection.info()
580580
pool = bad_connection.connection_pool
581581
assert len(pool._available_connections) == 1
582-
assert not pool._list(available_connections)[0]._reader
582+
assert not pool.list(available_connections)[0]._reader
583583

584584
@pytest.mark.onlynoncluster
585585
@skip_if_server_version_lt("2.8.8")
@@ -610,7 +610,7 @@ async def test_busy_loading_from_pipeline_immediate_command(self, r):
610610
pool = r.connection_pool
611611
assert not pipe.connection
612612
assert len(pool._available_connections) == 1
613-
assert not pool._list(available_connections)[0]._reader
613+
assert not pool.list(available_connections)[0]._reader
614614

615615
@pytest.mark.onlynoncluster
616616
@skip_if_server_version_lt("2.8.8")
@@ -627,7 +627,7 @@ async def test_busy_loading_from_pipeline(self, r):
627627
pool = r.connection_pool
628628
assert not pipe.connection
629629
assert len(pool._available_connections) == 1
630-
assert not pool._list(available_connections)[0]._reader
630+
assert not pool.list(available_connections)[0]._reader
631631

632632
@skip_if_server_version_lt("2.8.8")
633633
@skip_if_redis_enterprise()

tests/test_connection_pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def test_busy_loading_from_pipeline_immediate_command(self, r):
530530
pool = r.connection_pool
531531
assert not pipe.connection
532532
assert len(pool._available_connections) == 1
533-
assert not pool._list(available_connections)[0]._sock
533+
assert not pool.list(available_connections)[0]._sock
534534

535535
@pytest.mark.onlynoncluster
536536
@skip_if_server_version_lt("2.8.8")
@@ -547,7 +547,7 @@ def test_busy_loading_from_pipeline(self, r):
547547
pool = r.connection_pool
548548
assert not pipe.connection
549549
assert len(pool._available_connections) == 1
550-
assert not pool._list(available_connections)[0]._sock
550+
assert not pool.list(available_connections)[0]._sock
551551

552552
@skip_if_server_version_lt("2.8.8")
553553
@skip_if_redis_enterprise()

0 commit comments

Comments
 (0)