(self)
| 531 | self.assertEqual(await replacement.fetchval('SELECT 1'), 1) |
| 532 | |
| 533 | async def test_pool_no_acquire_deadlock(self): |
| 534 | async with self.create_pool(database='postgres', |
| 535 | init_size=1, min_size=1, max_size=1, |
| 536 | max_queries=1) as pool: |
| 537 | |
| 538 | async def sleep_and_release(): |
| 539 | async with pool.acquire() as con: |
| 540 | await con.execute('SELECT pg_sleep(1)') |
| 541 | |
| 542 | asyncio.ensure_future(sleep_and_release()) |
| 543 | await asyncio.sleep(0.5) |
| 544 | |
| 545 | async with pool.acquire() as con: |
| 546 | await con.fetchval('SELECT 1') |
| 547 | |
| 548 | async def test_pool_config_persistence(self): |
| 549 | N = 100 |
nothing calls this directly
no test coverage detected