From d6bfb4cf49aef4bfe8bec007cda287204b21431c Mon Sep 17 00:00:00 2001 From: Julian Sommer <115516918+juliansommer@users.noreply.github.com> Date: Tue, 6 Oct 2026 13:23:52 +1000 Subject: [PATCH] fix: pin daemon tests off the host's live MemAvailable Admission clamps on live MemAvailable, so on a loaded box running tests in parallel any daemon test that allocates could see no capacity. TestMain now disables the live-memory gate; its own tests inject a reader. --- spinifex/daemon/main_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spinifex/daemon/main_test.go b/spinifex/daemon/main_test.go index cd725ec0c..544ca453b 100644 --- a/spinifex/daemon/main_test.go +++ b/spinifex/daemon/main_test.go @@ -25,6 +25,10 @@ func TestMain(m *testing.M) { // refuse to start and every daemon-constructing test would fail. 4 keeps the // default reserve intact with 2 schedulable cores — enough for these tests. os.Setenv("SPINIFEX_HOST_VCPU", "4") + // Admission otherwise also clamps on the host's live MemAvailable, which a + // loaded box running tests in parallel can drop below the reserve. The gate + // has its own tests that inject a reader. + os.Setenv("SPINIFEX_ADMISSION_LIVE_MEM", "0") // Start a plain NATS server (no JetStream) ns, err := server.NewServer(&server.Options{