From c5251111335f83f56754aefff2defe6459766b03 Mon Sep 17 00:00:00 2001 From: xeji <36407913+xeji@users.noreply.github.com> Date: Mon, 24 Sep 2018 17:31:46 +0200 Subject: 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). --- nixos/tests/hound.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"'); ''; }) -- cgit 1.4.1