Skip to content

Commit 2bb20af

Browse files
ericdalloeca-agent
andcommitted
Fix Windows unit-test failure on POSIX-only liveness probe tests
Two liveness-probe deftests had their bodies wrapped in (when-not h/windows? ...). On Windows the body short-circuited to nil, leaving the deftest with no (is ...) and causing kaocha to report "Test ran without assertions" and fail the Windows unit job. Skip the deftests at the var-definition level instead so they simply do not exist on Windows. 🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca-agent <git@eca.dev>
1 parent 84d3985 commit 2bb20af

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

test/eca/server_test.clj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@
2828
#(throw (ex-info "boom" {}))))
2929
"start! must not raise even when on-exit throws")))
3030

31-
(deftest start-liveness-probe-with-alive-parent-test
32-
(when-not h/windows?
31+
;; The two deftests below are skipped on Windows: they rely on `sleep` and on
32+
;; POSIX-style subprocess semantics that the liveness probe targets. Skipping
33+
;; the whole `deftest` (rather than gating only its body) keeps kaocha from
34+
;; reporting "Test ran without assertions" on Windows.
35+
(when-not h/windows?
36+
(deftest start-liveness-probe-with-alive-parent-test
3337
(testing "an alive parent does not trigger on-exit"
3438
(let [proc (spawn-blocking-process)
3539
exited? (promise)]
@@ -41,8 +45,8 @@
4145
(finally
4246
(p/destroy-tree proc)))))))
4347

44-
(deftest start-liveness-probe-fires-when-parent-dies-test
45-
(when-not h/windows?
48+
(when-not h/windows?
49+
(deftest start-liveness-probe-fires-when-parent-dies-test
4650
(testing "killing the parent triggers on-exit"
4751
(let [proc (spawn-blocking-process)
4852
exited? (promise)]

0 commit comments

Comments
 (0)