From 4aeafc6b63fbf9b0207ce51a3bbf0bc81c807115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 5 Apr 2019 02:27:05 +0100 Subject: [PATCH] tests/pdns-recursor: use waitForOpenPort as port check This should be safer w.r.t. race conditions. --- nixos/tests/pdns-recursor.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/pdns-recursor.nix b/nixos/tests/pdns-recursor.nix index fb24cfc72f1..bf6e6093d69 100644 --- a/nixos/tests/pdns-recursor.nix +++ b/nixos/tests/pdns-recursor.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: { +import ./make-test.nix ({ pkgs, ... }: { name = "powerdns"; nodes.server = { ... }: { @@ -7,6 +7,6 @@ import ./make-test.nix ({ pkgs, lib, ... }: { testScript = '' $server->waitForUnit("pdns-recursor"); - $server->succeed("echo | ${lib.getBin pkgs.netcat}/bin/nc -v localhost 53") + $server->waitForOpenPort("53"); ''; })