]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Make synchronous test async to avoid asyncio error
authorH <juana.galan@outlook.com>
Thu, 10 Feb 2022 23:07:18 +0000 (23:07 +0000)
committerH <juana.galan@outlook.com>
Thu, 10 Feb 2022 23:07:36 +0000 (23:07 +0000)
tests/pool/test_pool_async.py

index 79316106f36e5c25d7a0c2b9f2cf4455574f47e2..436e5dcb221ad7314ba91e5e6f6896595b905f3d 100644 (file)
@@ -924,7 +924,7 @@ async def test_bad_resize(dsn, min_size, max_size):
             await p.resize(min_size=min_size, max_size=max_size)
 
 
-def test_jitter():
+async def test_jitter():
     rnds = [pool.AsyncConnectionPool._jitter(30, -0.1, +0.2) for i in range(100)]
     assert 27 <= min(rnds) <= 28
     assert 35 < max(rnds) < 36