diff --git a/src/firebolt/model/engine.py b/src/firebolt/model/engine.py index bd17cedeef1..4cc4c6ed7aa 100644 --- a/src/firebolt/model/engine.py +++ b/src/firebolt/model/engine.py @@ -254,11 +254,10 @@ def wait(seconds: int, error_message: str) -> None: ) # wait for engine to start - while ( - wait_for_startup - and engine.current_status_summary - != EngineStatusSummary.ENGINE_STATUS_SUMMARY_RUNNING - ): + while wait_for_startup and engine.current_status_summary not in { + EngineStatusSummary.ENGINE_STATUS_SUMMARY_RUNNING, + EngineStatusSummary.ENGINE_STATUS_SUMMARY_FAILED, + }: wait( seconds=5, error_message=f"Could not start engine within {wait_timeout_seconds} seconds.", # noqa: E501