fix(tvix/boot/tests): use grpc health check

Ensure the service is healthy before connecting to it, don't just check
for the unix socket to be present.

Change-Id: If6501828677c247910d91f35b860960802084691
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12029
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2024-07-23 16:21:56 +02:00 committed by clbot
parent ca5134c3da
commit 636647ce03

View file

@ -65,8 +65,8 @@ let
--otlp=false \ --otlp=false \
daemon -l $PWD/tvix-store.sock & daemon -l $PWD/tvix-store.sock &
# Wait for the socket to be created. # Wait for the service to report healthy.
while [ ! -e $PWD/tvix-store.sock ]; do sleep 1; done timeout 22 sh -c "until ${pkgs.ip2unix}/bin/ip2unix -r out,path=$PWD/tvix-store.sock ${pkgs.grpc-health-check}/bin/grpc-health-check --address 127.0.0.1 --port 8080; do sleep 1; done"
# Export env vars so that subsequent tvix-store commands will talk to # Export env vars so that subsequent tvix-store commands will talk to
# our tvix-store daemon over the unix socket. # our tvix-store daemon over the unix socket.