diff options
author | WilliButz <wbutz@cyberfnord.de> | 2018-10-08 22:15:18 +0200 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2018-10-10 14:57:43 +0200 |
commit | cf4742365012a6718de0a2bee991066ae0e9697d (patch) | |
tree | 3b0b7a2d07607e32d6d4014dd0cca9dcf7553551 /nixos/tests/codimd.nix | |
parent | ce5e1b5b0a8e524d6ca5c5b48f6e41debe866f2a (diff) |
nixos/tests: fix non-determinism for good
Diffstat (limited to 'nixos/tests/codimd.nix')
-rw-r--r-- | nixos/tests/codimd.nix | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nixos/tests/codimd.nix b/nixos/tests/codimd.nix index 9dedac96844a..562f6f24f999 100644 --- a/nixos/tests/codimd.nix +++ b/nixos/tests/codimd.nix @@ -40,8 +40,7 @@ import ./make-test.nix ({ pkgs, lib, ... }: subtest "CodiMD sqlite", sub { $codimdSqlite->waitForUnit("codimd.service"); $codimdSqlite->waitForOpenPort(3000); - $codimdSqlite->sleep(10); # avoid 503 during startup - $codimdSqlite->succeed("curl -sSf http://localhost:3000/new"); + $codimdSqlite->waitUntilSucceeds("curl -sSf http://localhost:3000/new"); }; subtest "CodiMD postgres", sub { @@ -49,8 +48,7 @@ import ./make-test.nix ({ pkgs, lib, ... }: $codimdPostgres->waitForUnit("codimd.service"); $codimdPostgres->waitForOpenPort(5432); $codimdPostgres->waitForOpenPort(3000); - $codimdPostgres->sleep(10); # avoid 503 during startup - $codimdPostgres->succeed("curl -sSf http://localhost:3000/new"); + $codimdPostgres->waitUntilSucceeds("curl -sSf http://localhost:3000/new"); }; ''; }) |