MCPcopy
hub / github.com/MagicStack/asyncpg / test_pool_expire_connections

Method test_pool_expire_connections

tests/test_pool.py:897–908  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

895 await task
896
897 async def test_pool_expire_connections(self):
898 pool = await self.create_pool(database='postgres',
899 min_size=1, max_size=1)
900
901 con = await pool.acquire()
902 try:
903 await pool.expire_connections()
904 finally:
905 await pool.release(con)
906
907 self.assertIsNone(pool._holders[0]._con)
908 await pool.close()
909
910 async def test_pool_set_connection_args(self):
911 pool = await self.create_pool(database='postgres',

Callers

nothing calls this directly

Calls 5

expire_connectionsMethod · 0.80
create_poolMethod · 0.45
acquireMethod · 0.45
releaseMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected