From c38eea792693eb51c012ec751030ae1910fd8ce5 Mon Sep 17 00:00:00 2001 From: James Munson Date: Wed, 13 Mar 2024 15:39:06 -0600 Subject: [PATCH] fix: check for timeout in wait_deployment_replica_ready and fail if so. Signed-off-by: James Munson --- manager/integration/tests/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manager/integration/tests/common.py b/manager/integration/tests/common.py index a0ac04382e..133d14bada 100644 --- a/manager/integration/tests/common.py +++ b/manager/integration/tests/common.py @@ -4783,6 +4783,7 @@ def finalizer(): def wait_deployment_replica_ready(apps_api, deployment_name, desired_replica_count, namespace='default'): # NOQA + ok = False for i in range(DEFAULT_DEPLOYMENT_TIMEOUT): deployment = apps_api.read_namespaced_deployment( name=deployment_name, @@ -4791,9 +4792,11 @@ def wait_deployment_replica_ready(apps_api, deployment_name, # deployment is none if deployment is not yet created if deployment is not None and \ deployment.status.ready_replicas == desired_replica_count: + ok = True break time.sleep(DEFAULT_DEPLOYMENT_INTERVAL) + assert ok def create_and_wait_deployment(apps_api, deployment_manifest):