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

Method test_pool_09

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

Source from the content-addressed store, hash-verified

221 await pool.release(con._con)
222
223 async def test_pool_09(self):
224 pool1 = await self.create_pool(database='postgres',
225 init_size=1, min_size=1, max_size=1)
226
227 pool2 = await self.create_pool(database='postgres',
228 init_size=1, min_size=1, max_size=1)
229
230 try:
231 con = await pool1.acquire(timeout=POOL_NOMINAL_TIMEOUT)
232 with self.assertRaisesRegex(asyncpg.InterfaceError,
233 'is not a member'):
234 await pool2.release(con)
235 finally:
236 await pool1.release(con)
237
238 await pool1.close()
239 await pool2.close()
240
241 async def test_pool_10(self):
242 pool = await self.create_pool(database='postgres',

Callers

nothing calls this directly

Calls 4

create_poolMethod · 0.45
acquireMethod · 0.45
releaseMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected