From a432f832bf0de48abf799c34fd703f61c26793ab Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sat, 9 May 2020 11:42:22 +0200 Subject: [PATCH] nixos/tests/gitdaemon: fix spurious test failures due to flaky network This test is sometimes flaky on hydra as at the time of the `git clone` the network isn't really configured yet[1]. That problem doesn't seem to occur locally but if you run it on a machine with high enough load (such as hydra build machines). Hopefully this will make the test not flaky anymore. [1] https://hydra.nixos.org/build/118710378/nixlog/21/raw --- nixos/tests/gitdaemon.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/tests/gitdaemon.nix b/nixos/tests/gitdaemon.nix index b610caf06fb..c4a707943ef 100644 --- a/nixos/tests/gitdaemon.nix +++ b/nixos/tests/gitdaemon.nix @@ -55,6 +55,9 @@ in { with subtest("git daemon starts"): server.wait_for_unit("git-daemon.service") + server.wait_for_unit("network-online.target") + client.wait_for_unit("network-online.target") + with subtest("client can clone project.git"): client.succeed( "git clone git://server/project.git /project",