(self)
| 1380 | self.assertTrue(conn_released) |
| 1381 | |
| 1382 | async def test_pool_close_timeout(self): |
| 1383 | pool = await self.create_pool(database='postgres', |
| 1384 | init_size=1, min_size=1, max_size=1) |
| 1385 | |
| 1386 | flag = self.loop.create_future() |
| 1387 | |
| 1388 | async def worker(): |
| 1389 | async with pool.acquire(): |
| 1390 | flag.set_result(True) |
| 1391 | await asyncio.sleep(0.5) |
| 1392 | |
| 1393 | task = self.loop.create_task(worker()) |
| 1394 | |
| 1395 | with self.assertRaises(asyncio.TimeoutError): |
| 1396 | await flag |
| 1397 | await asyncio.wait_for(pool.close(), timeout=0.1) |
| 1398 | |
| 1399 | await task |
| 1400 | |
| 1401 | async def test_pool_expire_connections(self): |
| 1402 | pool = await self.create_pool(database='postgres', |
nothing calls this directly
no test coverage detected