(self)
| 876 | self.assertTrue(conn_released) |
| 877 | |
| 878 | async def test_pool_close_timeout(self): |
| 879 | pool = await self.create_pool(database='postgres', |
| 880 | min_size=1, max_size=1) |
| 881 | |
| 882 | flag = self.loop.create_future() |
| 883 | |
| 884 | async def worker(): |
| 885 | async with pool.acquire(): |
| 886 | flag.set_result(True) |
| 887 | await asyncio.sleep(0.5) |
| 888 | |
| 889 | task = self.loop.create_task(worker()) |
| 890 | |
| 891 | with self.assertRaises(asyncio.TimeoutError): |
| 892 | await flag |
| 893 | await asyncio.wait_for(pool.close(), timeout=0.1) |
| 894 | |
| 895 | await task |
| 896 | |
| 897 | async def test_pool_expire_connections(self): |
| 898 | pool = await self.create_pool(database='postgres', |
nothing calls this directly
no test coverage detected