(self)
| 1455 | await pool.close() |
| 1456 | |
| 1457 | async def test_pool_init_race(self): |
| 1458 | pool = self.create_pool( |
| 1459 | database='postgres', |
| 1460 | init_size=1, |
| 1461 | min_size=1, |
| 1462 | max_size=1, |
| 1463 | ) |
| 1464 | |
| 1465 | t1 = asyncio.ensure_future(pool) |
| 1466 | t2 = asyncio.ensure_future(pool) |
| 1467 | |
| 1468 | await t1 |
| 1469 | with self.assertRaisesRegex( |
| 1470 | asyncpg.InterfaceError, |
| 1471 | r'pool is being initialized in another task'): |
| 1472 | await t2 |
| 1473 | |
| 1474 | await pool.close() |
| 1475 | |
| 1476 | async def test_pool_init_and_use_race(self): |
| 1477 | pool = self.create_pool( |
nothing calls this directly
no test coverage detected