(self)
| 472 | self.assertEqual(pool._queue.qsize(), 1) |
| 473 | |
| 474 | async def test_pool_no_acquire_deadlock(self): |
| 475 | async with self.create_pool(database='postgres', |
| 476 | min_size=1, max_size=1, |
| 477 | max_queries=1) as pool: |
| 478 | |
| 479 | async def sleep_and_release(): |
| 480 | async with pool.acquire() as con: |
| 481 | await con.execute('SELECT pg_sleep(1)') |
| 482 | |
| 483 | asyncio.ensure_future(sleep_and_release()) |
| 484 | await asyncio.sleep(0.5) |
| 485 | |
| 486 | async with pool.acquire() as con: |
| 487 | await con.fetchval('SELECT 1') |
| 488 | |
| 489 | async def test_pool_config_persistence(self): |
| 490 | N = 100 |
nothing calls this directly
no test coverage detected