(self, sandbox_name: str, *, timeout_seconds: float = 60.0)
| 443 | return bool(response.deleted) |
| 444 | |
| 445 | def wait_deleted(self, sandbox_name: str, *, timeout_seconds: float = 60.0) -> None: |
| 446 | deadline = time.time() + timeout_seconds |
| 447 | while time.time() < deadline: |
| 448 | try: |
| 449 | self.get(sandbox_name) |
| 450 | except grpc.RpcError as exc: |
| 451 | if ( |
| 452 | isinstance(exc, grpc.Call) |
| 453 | and exc.code() == grpc.StatusCode.NOT_FOUND |
| 454 | ): |
| 455 | return |
| 456 | raise |
| 457 | time.sleep(1) |
| 458 | raise SandboxError(f"sandbox {sandbox_name} was not deleted within timeout") |
| 459 | |
| 460 | def wait_ready( |
| 461 | self, sandbox_name: str, *, timeout_seconds: float = 300.0 |
no test coverage detected