(self)
| 951 | await pool.close() |
| 952 | |
| 953 | async def test_pool_init_race(self): |
| 954 | pool = self.create_pool(database='postgres', min_size=1, max_size=1) |
| 955 | |
| 956 | t1 = asyncio.ensure_future(pool) |
| 957 | t2 = asyncio.ensure_future(pool) |
| 958 | |
| 959 | await t1 |
| 960 | with self.assertRaisesRegex( |
| 961 | asyncpg.InterfaceError, |
| 962 | r'pool is being initialized in another task'): |
| 963 | await t2 |
| 964 | |
| 965 | await pool.close() |
| 966 | |
| 967 | async def test_pool_init_and_use_race(self): |
| 968 | pool = self.create_pool(database='postgres', min_size=1, max_size=1) |
nothing calls this directly
no test coverage detected