summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorUli Baum <xeji@cat3.de>2018-08-26 13:38:58 +0200
committerUli Baum <xeji@cat3.de>2018-08-26 13:38:58 +0200
commita44469d7b66815fcadd628e07ae86e6b7bc7f26b (patch)
treeb5387cbe0f8838a9eb83189a155c3fc66a49858e /nixos
parent3d1331f438b536f65fa4f5a07cbcb9eaaae8ce2f (diff)
downloadnixpkgs-a44469d7b66815fcadd628e07ae86e6b7bc7f26b.tar
nixpkgs-a44469d7b66815fcadd628e07ae86e6b7bc7f26b.tar.gz
nixpkgs-a44469d7b66815fcadd628e07ae86e6b7bc7f26b.tar.bz2
nixpkgs-a44469d7b66815fcadd628e07ae86e6b7bc7f26b.tar.lz
nixpkgs-a44469d7b66815fcadd628e07ae86e6b7bc7f26b.tar.xz
nixpkgs-a44469d7b66815fcadd628e07ae86e6b7bc7f26b.tar.zst
nixpkgs-a44469d7b66815fcadd628e07ae86e6b7bc7f26b.zip
nixos/tests/netdata: fix non-deterministic failure
The test sporadically failed on hydra when a request was made
before the service was actually listening on its port.
Explicitly wait for the port to open.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/netdata.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/tests/netdata.nix b/nixos/tests/netdata.nix
index eb45db6f04c..9bd147968e4 100644
--- a/nixos/tests/netdata.nix
+++ b/nixos/tests/netdata.nix
@@ -20,6 +20,9 @@ import ./make-test.nix ({ pkgs, ...} : {
 
     $netdata->waitForUnit("netdata.service");
 
+    # wait for the service to listen before sending a request
+    $netdata->waitForOpenPort(19999);
+
     # check if the netdata main page loads.
     $netdata->succeed("curl --fail http://localhost:19999/");