about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-07-23T14·21+0200
committerclbot <clbot@tvl.fyi>2024-07-23T14·47+0000
commit636647ce0367f843ace4b40ad8062289d32ed11d (patch)
treec5fe48073f48c7589397adacaa5dbc251bab0bb0
parentca5134c3da88fcb1b2d3684bbc8d8c28afef9f25 (diff)
fix(tvix/boot/tests): use grpc health check r/8409
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
-rw-r--r--tvix/boot/tests/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/boot/tests/default.nix b/tvix/boot/tests/default.nix
index 101b71819d19..1ea34b186e81 100644
--- a/tvix/boot/tests/default.nix
+++ b/tvix/boot/tests/default.nix
@@ -65,8 +65,8 @@ let
               --otlp=false \
               daemon -l $PWD/tvix-store.sock &
 
-          # Wait for the socket to be created.
-          while [ ! -e $PWD/tvix-store.sock ]; do sleep 1; done
+          # Wait for the service to report healthy.
+          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
           # our tvix-store daemon over the unix socket.