Skip to content

Commit 194f732

Browse files
committed
fix ci2
1 parent 2f16680 commit 194f732

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/test-emulators.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ jobs:
5252
run: bash scripts/run-tests-fast.sh
5353

5454
- name: Run e2e tests
55-
run: bash scripts/run-tests-e2e.sh | tee e2e.log
55+
run: |
56+
set -o pipefail
57+
bash scripts/run-tests-e2e.sh | tee e2e.log
5658
5759
- name: Summarize skipped e2e tests
5860
if: always()

elasticsearch-cli/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func init() {
3333
}
3434

3535
client = &http.Client{
36-
Timeout: 30 * time.Second,
36+
Timeout: 60 * time.Second,
3737
}
3838
}
3939

scripts/wait-for-services.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,28 @@ wait_postgres() {
119119
}
120120

121121
wait_http "Firebase UI" "http://localhost:4000" "$DEFAULT_WAIT"
122-
wait_http "Elasticsearch" "http://localhost:9200/_cluster/health" "$DEFAULT_WAIT"
122+
wait_elasticsearch() {
123+
local name="$1"; shift
124+
local url="$1"; shift
125+
local max="${1:-$DEFAULT_WAIT}"
126+
echo "- Waiting for ${name} at ${url}"
127+
for _ in $(seq 1 "$max"); do
128+
local response
129+
response=$(curl -s "$url" || true)
130+
if [[ "$response" == *"\"status\":\"green\""* ]] || [[ "$response" == *"\"status\":\"yellow\""* ]]; then
131+
echo " ${name} is ready (status: green/yellow)"
132+
return 0
133+
fi
134+
sleep 2
135+
done
136+
echo " ERROR: ${name} not ready in time" >&2
137+
echo " Last response: $response" >&2
138+
return 1
139+
}
140+
141+
wait_http "Firebase UI" "http://localhost:4000" "$DEFAULT_WAIT"
142+
wait_elasticsearch "Elasticsearch" "http://localhost:9200/_cluster/health" "$DEFAULT_WAIT"
143+
123144
wait_http "Qdrant" "http://localhost:6333/healthz" "$DEFAULT_WAIT"
124145
wait_http "Neo4j HTTP" "http://localhost:7474" "$DEFAULT_WAIT"
125146
wait_http "A2A Inspector" "http://localhost:8081" "$A2A_WAIT"

0 commit comments

Comments
 (0)