From bfe7bd49cf41d5487a6a7fa01af355f30a3110bc Mon Sep 17 00:00:00 2001 From: ppenguin Date: Thu, 30 Jan 2025 16:25:22 +0100 Subject: [PATCH] fix/robustify wait_for_port function --- src/modules/tests.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/tests.nix b/src/modules/tests.nix index 1fb425120..ad7befe35 100644 --- a/src/modules/tests.nix +++ b/src/modules/tests.nix @@ -34,7 +34,7 @@ local port=$1 local timeout=''${2:-15} - timeout $timeout bash -c "until echo > /dev/tcp/localhost/$port; do sleep 0.5; done" + timeout $timeout bash -c "until ${pkgs.libressl.nc}/bin/nc -z localhost $port 2>/dev/null; do sleep 0.5; done" } export -f wait_for_port