(self)
| 123 | pool.terminate() |
| 124 | |
| 125 | async def test_pool_05(self): |
| 126 | for n in {1, 3, 5, 10, 20, 100}: |
| 127 | with self.subTest(tasksnum=n): |
| 128 | pool = await self.create_pool(database='postgres', |
| 129 | init_size=5, |
| 130 | min_size=1, |
| 131 | max_size=10) |
| 132 | |
| 133 | async def worker(): |
| 134 | async with pool.acquire() as con: |
| 135 | self.assertEqual(await con.fetchval('SELECT 1'), 1) |
| 136 | |
| 137 | tasks = [worker() for _ in range(n)] |
| 138 | await asyncio.gather(*tasks) |
| 139 | await pool.close() |
| 140 | |
| 141 | async def test_pool_06(self): |
| 142 | fut = asyncio.Future() |
nothing calls this directly
no test coverage detected