From 6737ec00bcec33631cd33bc37f28938c51123066 Mon Sep 17 00:00:00 2001 From: BukeLy Date: Thu, 20 Nov 2025 00:38:28 +0800 Subject: [PATCH] fix: improve Qdrant wait strategy in E2E tests Why this change is needed: Previous wait strategy used `/health` endpoint with `-f` flag and only 30 second timeout, causing timeouts in GitHub Actions. How it solves it: - Use root endpoint `/` instead of `/health` (Qdrant API root responds) - Remove `-f` flag to accept any response (not just 2xx) - Increase timeout from 30s to 60s - Add progress output for each attempt - Add clear error message on failure Impact: More reliable Qdrant service detection in E2E tests Testing: Will verify on GitHub Actions E2E test run --- .github/workflows/e2e-tests.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 98c9f5cc..b39f2cd3 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -128,12 +128,27 @@ jobs: - name: Wait for Qdrant run: | - timeout 30 bash -c 'until curl -f http://localhost:6333/health > /dev/null 2>&1; do sleep 1; done' - echo "Qdrant is ready" + echo "Waiting for Qdrant to be ready..." + for i in {1..60}; do + if curl -s http://localhost:6333 > /dev/null 2>&1; then + echo "Qdrant is ready!" + break + fi + echo "Attempt $i/60: Qdrant not ready yet, waiting..." + sleep 1 + done + # Final check + if ! curl -s http://localhost:6333 > /dev/null 2>&1; then + echo "ERROR: Qdrant failed to start after 60 seconds" + exit 1 + fi - name: Verify Qdrant connection run: | + echo "Verifying Qdrant API..." curl -X GET "http://localhost:6333/collections" -H "Content-Type: application/json" + echo "" + echo "Qdrant is accessible and ready for testing" - name: Run Qdrant E2E tests env: