From de34a56204ddfd091239ed836f828276694b2880 Mon Sep 17 00:00:00 2001 From: Carl Henrik Lunde Date: Fri, 13 Feb 2026 12:30:06 +0100 Subject: [PATCH] e2e: Use rollout status on the statefulset to avoid race condition for pod start Signed-off-by: Carl Henrik Lunde --- cluster/local/integration_tests.sh | 6 ++---- cluster/local/mssqldb_functions.sh | 3 +-- cluster/local/postgresdb_functions.sh | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cluster/local/integration_tests.sh b/cluster/local/integration_tests.sh index 86bd536a..41b989c5 100755 --- a/cluster/local/integration_tests.sh +++ b/cluster/local/integration_tests.sh @@ -305,8 +305,7 @@ setup_mariadb_no_tls() { "${KUBECTL}" apply -f ${scriptdir}/mariadb.server.yaml echo_step "Waiting for MariaDB to be ready" - "${KUBECTL}" wait --for=create pod mariadb-0 - "${KUBECTL}" wait --for=condition=ready pod -l app=mariadb --timeout=120s + "${KUBECTL}" rollout status statefulset/mariadb --timeout=120s } setup_mariadb_tls() { @@ -331,8 +330,7 @@ setup_mariadb_tls() { "${KUBECTL}" apply -f "${scriptdir}/mariadb.tls.server.yaml" echo_step "Waiting for MariaDB to be ready" - "${KUBECTL}" wait --for=create pod mariadb-0 - "${KUBECTL}" wait --for=condition=ready pod -l app=mariadb --timeout=120s + "${KUBECTL}" rollout status statefulset/mariadb --timeout=120s } cleanup_mariadb() { diff --git a/cluster/local/mssqldb_functions.sh b/cluster/local/mssqldb_functions.sh index 33b7a271..d7941cc4 100644 --- a/cluster/local/mssqldb_functions.sh +++ b/cluster/local/mssqldb_functions.sh @@ -16,8 +16,7 @@ setup_mssql() { "${KUBECTL}" apply -f ${scriptdir}/mssql.server.yaml echo_step "Waiting for MSSQL Server to be ready" - "${KUBECTL}" wait --for=create pod mssql-0 - "${KUBECTL}" wait --for=condition=ready pod -l app=mssql --timeout=300s + "${KUBECTL}" rollout status statefulset/mssql --timeout=300s # Wait a bit more for MSSQL to be fully ready for connections sleep 30 diff --git a/cluster/local/postgresdb_functions.sh b/cluster/local/postgresdb_functions.sh index d646e968..d3a6a725 100644 --- a/cluster/local/postgresdb_functions.sh +++ b/cluster/local/postgresdb_functions.sh @@ -15,7 +15,7 @@ setup_postgresdb_no_tls() { "${KUBECTL}" apply -f "${scriptdir}/postgres.server.yaml" echo_step "Waiting for PostgreSQL to be ready" - "${KUBECTL}" wait --for=condition=ready pod -l app=postgresdb-postgresql --timeout=120s + "${KUBECTL}" rollout status statefulset/postgresdb-postgresql --timeout=120s "${KUBECTL}" port-forward --namespace default svc/postgresdb-postgresql 5432:5432 & PORT_FORWARD_PID=$!