mirror of
https://github.com/versity/versitygw.git
synced 2026-09-22 07:54:14 +00:00
fix: replace fixed sleep with readiness polling in azurite CI
The azurite workflow waited a hardcoded `sleep 40` for the gateway container to compile and start listening before running tests. The container cold-builds `versitygw` from source on every run via `CompileDaemon`, and as the codebase grew that build increasingly exceeded the 40s budget, so tests started against a port with nothing listening yet and failed with connection resets. Poll `http://127.0.0.1:7070/` with `curl` until it responds, bounded by a `timeout`, so the wait scales with actual build time instead of a stale constant.
This commit is contained in:
@@ -20,8 +20,9 @@ jobs:
|
||||
run: |
|
||||
docker compose -f tests/docker-compose.yml --env-file .env.dev --project-directory . up -d azurite azuritegw
|
||||
|
||||
- name: Wait for Azurite to be ready
|
||||
run: sleep 40
|
||||
- name: Wait for services to be ready
|
||||
run: |
|
||||
timeout 180 bash -c 'until curl -s -o /dev/null http://127.0.0.1:7070/; do sleep 2; done'
|
||||
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user