From dd96b1900ae07710c03e74c6934cf38faa5f1b66 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Fri, 5 Jun 2026 21:26:32 -0400 Subject: [PATCH] test(nrepl): add watchdog + explicit exit so the integration test can't hang CI --- test/integration/nrepl-test.janet | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/nrepl-test.janet b/test/integration/nrepl-test.janet index 8a90ac7..47ce919 100644 --- a/test/integration/nrepl-test.janet +++ b/test/integration/nrepl-test.janet @@ -10,6 +10,9 @@ (def port "17888") +# Watchdog: never let a hang stall CI — bail out after 30s. +(ev/spawn (ev/sleep 30) (eprint "nrepl-test: watchdog fired (possible hang)") (os/exit 1)) + (print "Starting jolt.nrepl server subprocess on port " port " ...") (def proc (os/spawn ["janet" "src/jolt/main.janet" "nrepl" port] :p {:out :pipe :err :pipe})) @@ -81,5 +84,5 @@ (when (os/stat ".nrepl-port") (os/rm ".nrepl-port")) (if (> fails 0) - (error (string "nrepl-test: " fails " failing check(s)")) - (print "\nAll nREPL tests passed!")) + (do (eprint "nrepl-test: " fails " failing check(s)") (os/exit 1)) + (do (print "\nAll nREPL tests passed!") (os/exit 0)))