(predicate, timeout: float = 10.0)
| 23 | |
| 24 | |
| 25 | async def _wait_for_condition(predicate, timeout: float = 10.0) -> None: |
| 26 | deadline = asyncio.get_running_loop().time() + timeout |
| 27 | while True: |
| 28 | if predicate(): |
| 29 | return |
| 30 | if asyncio.get_running_loop().time() >= deadline: |
| 31 | raise TimeoutError("condition was not met before timeout") |
| 32 | await asyncio.sleep(0.05) |
| 33 | |
| 34 | |
| 35 | async def _wait_for_last_session_id(client) -> str: |
no test coverage detected
searching dependent graphs…