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
This commit is contained in:
parent
bef7577fd9
commit
6737ec00bc
1 changed files with 17 additions and 2 deletions
19
.github/workflows/e2e-tests.yml
vendored
19
.github/workflows/e2e-tests.yml
vendored
|
|
@ -128,12 +128,27 @@ jobs:
|
||||||
|
|
||||||
- name: Wait for Qdrant
|
- name: Wait for Qdrant
|
||||||
run: |
|
run: |
|
||||||
timeout 30 bash -c 'until curl -f http://localhost:6333/health > /dev/null 2>&1; do sleep 1; done'
|
echo "Waiting for Qdrant to be ready..."
|
||||||
echo "Qdrant is 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
|
- name: Verify Qdrant connection
|
||||||
run: |
|
run: |
|
||||||
|
echo "Verifying Qdrant API..."
|
||||||
curl -X GET "http://localhost:6333/collections" -H "Content-Type: application/json"
|
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
|
- name: Run Qdrant E2E tests
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue