MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / wait_for_pool_size

Method wait_for_pool_size

tests/test_pool.py:51–56  ·  view source on GitHub ↗
(self, pool, size)

Source from the content-addressed store, hash-verified

49class TestPool(tb.ConnectedTestCase):
50
51 async def wait_for_pool_size(self, pool, size):
52 async def wait():
53 while pool.get_size() != size:
54 await asyncio.sleep(0.01)
55
56 await asyncio.wait_for(wait(), 5)
57
58 async def test_pool_01(self):
59 for n in {1, 5, 10, 20, 100}:

Calls

no outgoing calls

Tested by

no test coverage detected