From 3189e21f70d5b1f7bb61744f24d6df875dad3c0f Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Sat, 7 Nov 2026 21:42:39 +0000 Subject: [PATCH] zstd: Wait for envoy-stats before the first check `up --wait` returns once envoy-stats is running, as it has no healthcheck, so the first request could race Envoy starting to listen and fail with curl unable to connect. Wait for it as brotli already does. Signed-off-by: Ryan Northey --- zstd/verify.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zstd/verify.sh b/zstd/verify.sh index 2e9acae3..3a0f4eed 100755 --- a/zstd/verify.sh +++ b/zstd/verify.sh @@ -6,10 +6,11 @@ export NAME=zstd . "$(dirname "${BASH_SOURCE[0]}")/../verify-common.sh" run_log "Test service: localhost:${PORT_PROXY}/file.json with compression" -responds_with_header \ - "content-encoding: zstd" \ - "https://localhost:${PORT_PROXY}/file.json" \ - -ki -H "Accept-Encoding: zstd" +# envoy-stats has no healthcheck, so `up --wait` can return before it is listening. +wait_for 15 bash -c "\ + responds_with_header \ + 'content-encoding: zstd' \ + https://localhost:${PORT_PROXY}/file.json -ki -H 'Accept-Encoding: zstd'" run_log "Test service: localhost:${PORT_PROXY}/file.txt without compression" responds_without_header \