]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Drop especially flaky async test dealing with del behaviour
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 8 Mar 2021 02:26:12 +0000 (03:26 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 12 Mar 2021 04:07:25 +0000 (05:07 +0100)
tests/pool/test_pool_async.py

index 090530487cd298813a6a29d79a497e40fe1e8af7..123fb12a4f8810bc3eb8183e10f8e7f3332d5a70 100644 (file)
@@ -1,7 +1,6 @@
 import sys
 import asyncio
 import logging
-import weakref
 from time import time
 from collections import Counter
 
@@ -443,19 +442,6 @@ async def test_putconn_wrong_pool(dsn):
                 await p2.putconn(conn)
 
 
-async def test_del_no_warning(dsn, recwarn):
-    p = pool.AsyncConnectionPool(dsn, minconn=2)
-    async with p.connection() as conn:
-        await conn.execute("select 1")
-
-    await p.wait_ready()
-    ref = weakref.ref(p)
-    del p
-    await asyncio.sleep(0.1)  # TODO: I wish it wasn't needed
-    assert not ref()
-    assert not recwarn
-
-
 async def test_closed_getconn(dsn):
     p = pool.AsyncConnectionPool(dsn, minconn=1)
     assert not p.closed