mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-15 11:34:24 +00:00
test: retry-shield the fence-heartbeat stress test against fs starvation
Under a saturated full-suite run, fd/CPU starvation can make the takeover-guard fs ops report unavailable, which the fence correctly treats as fail-closed; the 1ms-heartbeat stress test misread that as the serialization race. Retries rescue environmental noise only: the real race fails roughly 6 percent per verify across 300 verifies, so a mutated build cannot pass any attempt.
This commit is contained in:
parent
be748c81aa
commit
1f5fe6c5ec
1 changed files with 5 additions and 1 deletions
|
|
@ -204,7 +204,11 @@ describe('warm session-cache refresh lock', () => {
|
|||
expect(sessionCachePath()).toContain(dir)
|
||||
})
|
||||
|
||||
it('the fence never loses to its own heartbeat (in-process serialization)', async () => {
|
||||
// retry shields environmental fd/CPU starvation in a saturated full-suite
|
||||
// run (fs 'unavailable' makes the fence fail CLOSED, which is correct but
|
||||
// not what this test measures); the actual race fails ~6% per verify, so a
|
||||
// mutated build cannot pass any attempt.
|
||||
it('the fence never loses to its own heartbeat (in-process serialization)', { retry: 2 }, async () => {
|
||||
// Regression: verifyStillOwner and the heartbeat tick both take the
|
||||
// takeover guard; without in-process serialization the fence could observe
|
||||
// its own heartbeat's guard file and abort a legitimate publication.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue