From 39c7d1fe98bd131b53f75a5b9cfd6ce926f82d99 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Fri, 20 Dec 2024 14:13:26 +0100 Subject: [PATCH] try with updated wait script --- .github/workflows/test_e2e.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_e2e.yml b/.github/workflows/test_e2e.yml index ba981860d..a4fecae85 100644 --- a/.github/workflows/test_e2e.yml +++ b/.github/workflows/test_e2e.yml @@ -51,9 +51,19 @@ jobs: - name: Wait for the frontend to be ready run: | for i in {1..10}; do - curl -s http://localhost:3000/login && break || sleep 5 + if curl -s --connect-timeout 5 http://localhost:3000/login > /dev/null; then + break + else + echo "Connection failed. Try $i from 10. Wait 5 Seconds..." + sleep 5 + fi done + if [ $i -eq 10 ]; then + echo "Server not reachable after 10 tries." + exit 1 + fi + - name: End-to-end tests | run tests id: e2e-tests run: |