git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/tests: fix non-determinism for good
commitcf4742365012a6718de0a2bee991066ae0e9697d authorWilliButz <wbutz@cyberfnord.de> dateMon 8 Oct 2018, 22:15 (8 years ago) parentce5e1b5
1 file changed+2−4
nixos/tests/codimd.nix+2−4
nixos/tests/codimd.nix+2−4
@@ -40,8 +40,7 @@ import ./make-test.nix ({ pkgs, lib, ... }:
4040 subtest "CodiMD sqlite", sub {
4141 $codimdSqlite->waitForUnit("codimd.service");
4242 $codimdSqlite->waitForOpenPort(3000);
43− $codimdSqlite->sleep(10); # avoid 503 during startup
44− $codimdSqlite->succeed("curl -sSf http://localhost:3000/new");
43+ $codimdSqlite->waitUntilSucceeds("curl -sSf http://localhost:3000/new");
4544 };
4645
4746 subtest "CodiMD postgres", sub {
@@ -49,8 +48,7 @@ import ./make-test.nix ({ pkgs, lib, ... }:
4948 $codimdPostgres->waitForUnit("codimd.service");
5049 $codimdPostgres->waitForOpenPort(5432);
5150 $codimdPostgres->waitForOpenPort(3000);
52− $codimdPostgres->sleep(10); # avoid 503 during startup
53− $codimdPostgres->succeed("curl -sSf http://localhost:3000/new");
51+ $codimdPostgres->waitUntilSucceeds("curl -sSf http://localhost:3000/new");
5452 };
5553 '';
5654})