about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2024-01-07 09:45:40 -0500
committerGitHub <noreply@github.com>2024-01-07 09:45:40 -0500
commitd49252891fa1df975221d953e93f910495b43de6 (patch)
tree1589b0dbd4312d551a4f09d79bec4945adc426ef /nixos/tests
parentf9bd3c2e0367498babaa3f6ffff9bd50dc4046c0 (diff)
parentc6394f7c41e04f90043705d371bde03e7c750fa7 (diff)
downloadnixlib-d49252891fa1df975221d953e93f910495b43de6.tar
nixlib-d49252891fa1df975221d953e93f910495b43de6.tar.gz
nixlib-d49252891fa1df975221d953e93f910495b43de6.tar.bz2
nixlib-d49252891fa1df975221d953e93f910495b43de6.tar.lz
nixlib-d49252891fa1df975221d953e93f910495b43de6.tar.xz
nixlib-d49252891fa1df975221d953e93f910495b43de6.tar.zst
nixlib-d49252891fa1df975221d953e93f910495b43de6.zip
Merge pull request #279015 from oddlama/fix-typesense-tests
typesense: fix test failure due to initialization timing
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/typesense.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/tests/typesense.nix b/nixos/tests/typesense.nix
index 4f07a2e194be..87ed248257ea 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}'
   '';
 })