@@ -247,28 +247,26 @@ jobs:
247247 shared-key : management-ubuntu-latest-x86_64-unknown-linux-gnu
248248 save-if : false
249249
250- - name : Install grpcurl
251- run : |
252- curl -sSL https://github.com/fullstorydev/grpcurl/releases/download/v1.9.3/grpcurl_1.9.3_linux_x86_64.tar.gz | tar -xz
253- sudo mv grpcurl /usr/local/bin/
254-
255250 - name : Start Ledger server
256251 working-directory : docker/ledger-integration-tests
257252 run : |
258253 docker compose up -d ledger
259254 echo "Waiting for Ledger to be ready..."
260- # Use gRPC health check to ensure Raft is bootstrapped and ready
261- # Port check alone isn't sufficient - server opens port before Raft is ready
255+ # Wait for metrics endpoint to be available (indicates server is running)
256+ # Then add delay for Raft bootstrap to complete
262257 for i in {1..30}; do
263- if grpcurl -plaintext localhost:50052 grpc.health.v1.Health/Check 2>/dev/null | grep -q "SERVING"; then
264- echo "Ledger gRPC health check passed!"
258+ if curl -sf http://localhost:9092/metrics > /dev/null 2>&1; then
259+ echo "Ledger metrics endpoint is available"
260+ # Give Raft a moment to fully bootstrap after server starts
261+ sleep 3
262+ echo "Ledger should be ready!"
265263 break
266264 fi
267265 echo "Attempt $i/30: Ledger not ready yet..."
268266 sleep 2
269267 done
270- # Final health check
271- grpcurl -plaintext localhost:50052 grpc.health.v1.Health/Check || (docker compose logs ledger && exit 1)
268+ # Final check - metrics endpoint must be available
269+ curl -sf http:// localhost:9092/metrics > /dev/null || (docker compose logs ledger && exit 1)
272270
273271 - name : Run Ledger integration tests
274272 env :
0 commit comments