Skip to content

Commit

Permalink
nixos/tests/hound: fix non-deterministic failure (#47152)
Browse files Browse the repository at this point in the history
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).

(cherry picked from commit c525111)
  • Loading branch information
xeji committed Sep 24, 2018
1 parent afe328b commit 4f4807a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/tests/hound.nix
Expand Up @@ -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"');
'';
})

0 comments on commit 4f4807a

Please sign in to comment.