diff options
author | oddlama <oddlama@oddlama.org> | 2024-01-05 21:10:30 +0100 |
---|---|---|
committer | oddlama <oddlama@oddlama.org> | 2024-01-07 13:04:59 +0100 |
commit | c6394f7c41e04f90043705d371bde03e7c750fa7 (patch) | |
tree | 56c0b2a8f5d22a3f467efd53abfa97f6d4129b76 /nixos | |
parent | e3d0c844283d488c97c210d28aea230817c2c04a (diff) |
typesense: fix test failure due to initialization timing
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/typesense.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/tests/typesense.nix b/nixos/tests/typesense.nix index 4f07a2e194be8..87ed248257ea0 100644 --- a/nixos/tests/typesense.nix +++ b/nixos/tests/typesense.nix @@ -18,6 +18,7 @@ in { testScript = '' machine.wait_for_unit("typesense.service") machine.wait_for_open_port(${toString testPort}) - assert machine.succeed("curl --fail http://localhost:${toString testPort}/health") == '{"ok":true}' + # After waiting for the port, typesense still hasn't initialized the database, so wait until we can connect successfully + assert machine.wait_until_succeeds("curl --fail http://localhost:${toString testPort}/health") == '{"ok":true}' ''; }) |