summary refs log tree commit diff
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-09-24 17:31:46 +0200
committerGitHub <noreply@github.com>2018-09-24 17:31:46 +0200
commitc5251111335f83f56754aefff2defe6459766b03 (patch)
tree8b749ba81b55f4b99eec33c52260e3af073e12f4
parentfe287e755ff9dcef5e09415f4935dc0b1f638b96 (diff)
downloadnixpkgs-c5251111335f83f56754aefff2defe6459766b03.tar
nixpkgs-c5251111335f83f56754aefff2defe6459766b03.tar.gz
nixpkgs-c5251111335f83f56754aefff2defe6459766b03.tar.bz2
nixpkgs-c5251111335f83f56754aefff2defe6459766b03.tar.lz
nixpkgs-c5251111335f83f56754aefff2defe6459766b03.tar.xz
nixpkgs-c5251111335f83f56754aefff2defe6459766b03.tar.zst
nixpkgs-c5251111335f83f56754aefff2defe6459766b03.zip
nixos/tests/hound: fix non-deterministic failure (#47152)
The test failed on Hydra in one instance because a request to the
server was sent before indexing was finished.
Retry the request until it succeeds (or times out).
-rw-r--r--nixos/tests/hound.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/tests/hound.nix b/nixos/tests/hound.nix
index f21c0ad58a8..cb8e25332c0 100644
--- a/nixos/tests/hound.nix
+++ b/nixos/tests/hound.nix
@@ -52,7 +52,7 @@ import ./make-test.nix ({ pkgs, ... } : {
        $machine->waitForUnit("network.target");
        $machine->waitForUnit("hound.service");
        $machine->waitForOpenPort(6080);
-       $machine->succeed('curl http://127.0.0.1:6080/api/v1/search\?stats\=fosho\&repos\=\*\&rng=%3A20\&q\=hi\&files\=\&i=nope | grep "Filename" | grep "hello"');
+       $machine->waitUntilSucceeds('curl http://127.0.0.1:6080/api/v1/search\?stats\=fosho\&repos\=\*\&rng=%3A20\&q\=hi\&files\=\&i=nope | grep "Filename" | grep "hello"');
 
     '';
 })