MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / test_pool_expire_connections

Method test_pool_expire_connections

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

Source from the content-addressed store, hash-verified

1399 await task
1400
1401 async def test_pool_expire_connections(self):
1402 pool = await self.create_pool(database='postgres',
1403 init_size=1, min_size=1, max_size=1)
1404
1405 con = await pool.acquire()
1406 try:
1407 await pool.expire_connections()
1408 finally:
1409 await pool.release(con)
1410
1411 self.assertIsNone(pool._holders[0]._con)
1412 await pool.close()
1413
1414 async def test_pool_set_connection_args(self):
1415 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