mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 16:03:49 +00:00
test(daemon): pin that an ownership conflict does not emit the degrade warning
The EEXIST rethrow sits above the non-atomic degrade warning precisely so a lost publish race stays quiet, but nothing pinned that order: moving the warn above the rethrow left all seven atomicity tests green. Assert the conflict path warns zero times so the two arms fail independently.
This commit is contained in:
@@ -130,6 +130,9 @@ describe('publishDaemonPidFile atomicity', () => {
|
||||
expect(() => publishDaemonPidFile(pidPath, RECORD)).toThrow(/EEXIST/)
|
||||
expect(readFileSync(pidPath, 'utf8')).toBe(existing)
|
||||
expect(listPublishScratch()).toEqual([])
|
||||
// An ownership conflict is routine, not a degrade: warning here would make the
|
||||
// real non-atomic warning below indistinguishable from a lost publish race.
|
||||
expect(warnSpy).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('degrades to the exclusive direct write when the filesystem cannot hard-link', () => {
|
||||
|
||||
Reference in New Issue
Block a user