Skip to content

Commit c48215d

Browse files
bm1549claude
andauthored
fix(ci): address flaky test infrastructure issues (#7706)
* fix(ci): address flaky test infrastructure issues - Add readiness wait after `docker compose up -d testagent` so tests don't start sending multipart data before busboy is ready - Copy servicebus emulator config file and restart emulator in the azure-service-bus CI job (queue.1/topic.1 were missing because GitHub Actions services don't support volume mounts; the azure-functions job already does this with docker cp + restart) - Wait for emulator to be ready after restart before running tests Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(ci): add SQL Edge health check and emulator ready-wait for azure-service-bus SQL Server Edge takes 45-90s to start; without a health check the Service Bus emulator connects before SQL is ready. Add a health check using bash TCP built-in (nc is not installed in the azure-sql-edge image) so GitHub Actions gates job steps until SQL is healthy. After docker restart, wait for port 5672 to be ready before running tests. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(ci): remove unnecessary emulator config copy from azure-service-bus job The azure-service-bus plugin tests use the built-in OOB emulator config (queue.1, topic.1), so copying a custom config file and restarting the emulator is not needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
1 parent cf28ba2 commit c48215d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/actions/testagent/start/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ runs:
66
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
77
- run: docker compose up -d testagent || docker compose up -d testagent
88
shell: bash
9+
- name: Wait for test agent to be ready
10+
run: timeout 30 bash -c 'until curl -sf http://127.0.0.1:9126/info >/dev/null; do sleep 1; done'
11+
shell: bash

.github/workflows/serverless.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,19 @@ jobs:
244244
env:
245245
ACCEPT_EULA: "Y"
246246
MSSQL_SA_PASSWORD: "Localtestpass1!"
247+
options: >-
248+
--health-cmd "bash -c 'exec 3<>/dev/tcp/localhost/1433'"
249+
--health-interval 10s
250+
--health-timeout 5s
251+
--health-retries 10
252+
--health-start-period 60s
247253
env:
248254
PLUGINS: azure-service-bus
249255
SERVICES: azureservicebusemulator,azuresqledge
250256
steps:
251257
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
258+
- name: Wait for Service Bus emulator to be ready
259+
run: timeout 120 bash -c 'until nc -z localhost 5672; do sleep 3; done'
252260
- uses: ./.github/actions/plugins/test
253261
with:
254262
dd_api_key: ${{ secrets.DD_API_KEY }}

0 commit comments

Comments
 (0)