File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -247,23 +247,28 @@ 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+
250255 - name : Start Ledger server
251256 working-directory : docker/ledger-integration-tests
252257 run : |
253258 docker compose up -d ledger
254259 echo "Waiting for Ledger to be ready..."
255- # Check from host side (port 50052 is mapped to container's 50051)
256- # Distroless container doesn 't have nc/shell utilities
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
257262 for i in {1..30}; do
258- if nc -z localhost 50052 2>/dev/null; then
259- echo "Ledger is ready !"
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 !"
260265 break
261266 fi
262267 echo "Attempt $i/30: Ledger not ready yet..."
263268 sleep 2
264269 done
265- # Final check
266- nc -z localhost 50052 || (docker compose logs ledger && exit 1)
270+ # Final health check
271+ grpcurl -plaintext localhost: 50052 grpc.health.v1.Health/Check || (docker compose logs ledger && exit 1)
267272
268273 - name : Run Ledger integration tests
269274 env :
You can’t perform that action at this time.
0 commit comments