summaryrefslogtreecommitdiff
path: root/tests/test_asyncio/test_connection.py
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2023-03-29 12:01:45 +0300
committerGitHub <noreply@github.com>2023-03-29 12:01:45 +0300
commit5acbde355058ab7d9c2f95bcef3993ab4134e342 (patch)
treebc90887cf2fc77d870254b5618d32a1a701c9186 /tests/test_asyncio/test_connection.py
parent6d886d7c7b405c0fe5d59ca192c87b438bf080f5 (diff)
downloadredis-py-5acbde355058ab7d9c2f95bcef3993ab4134e342.tar.gz
Fixing cancelled async futures (#2666)
Co-authored-by: James R T <jamestiotio@gmail.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
Diffstat (limited to 'tests/test_asyncio/test_connection.py')
-rw-r--r--tests/test_asyncio/test_connection.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/test_asyncio/test_connection.py b/tests/test_asyncio/test_connection.py
index d3b6285..e2d77fc 100644
--- a/tests/test_asyncio/test_connection.py
+++ b/tests/test_asyncio/test_connection.py
@@ -44,27 +44,6 @@ async def test_invalid_response(create_redis):
await r.connection.disconnect()
-async def test_asynckills():
-
- for b in [True, False]:
- r = Redis(single_connection_client=b)
-
- await r.set("foo", "foo")
- await r.set("bar", "bar")
-
- t = asyncio.create_task(r.get("foo"))
- await asyncio.sleep(1)
- t.cancel()
- try:
- await t
- except asyncio.CancelledError:
- pytest.fail("connection left open with unread response")
-
- assert await r.get("bar") == b"bar"
- assert await r.ping()
- assert await r.get("foo") == b"foo"
-
-
@pytest.mark.onlynoncluster
async def test_single_connection():
"""Test that concurrent requests on a single client are synchronised."""