mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
typesense: fix test failure due to initialization timing
This commit is contained in:
parent
e3d0c84428
commit
c6394f7c41
@ -18,6 +18,7 @@ in {
|
|||||||
testScript = ''
|
testScript = ''
|
||||||
machine.wait_for_unit("typesense.service")
|
machine.wait_for_unit("typesense.service")
|
||||||
machine.wait_for_open_port(${toString testPort})
|
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}'
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user