mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 09:01:31 +00:00
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.
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user