Conditions | 2 |
Total Lines | 10 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import asyncio |
||
9 | @pytest.mark.asyncio |
||
10 | async def test_client_auto_release(cluster): |
||
11 | client = await cluster.connect() |
||
12 | resp = await client.submit("1 + 1") |
||
13 | async for msg in resp: |
||
14 | pass |
||
15 | await asyncio.sleep(0) |
||
16 | host = cluster._hosts.popleft() |
||
17 | assert len(host._pool._available) == 1 |
||
18 | await host.close() |
||
19 | |||
49 |