fix: tolerate 1-2ms setTimeout jitter in the Ollama-enrichment timeout test
CI build-verify run #23 (commit 388c4f3) failed on a strict lower bound (elapsed >= 5000) that measured 4999ms -- normal clock/timer jitter between the two Date.now() reads, not a real regression in the 5s AbortController timeout itself. Confirmed unrelated to that commit's actual change (a route-glue removal). Loosened the floor to 4990ms.
This commit is contained in:
parent
f72ce5f991
commit
a4506de1c5
@ -210,8 +210,10 @@ describe('Hijack Detector', () => {
|
|||||||
const elapsed = Date.now() - startTime
|
const elapsed = Date.now() - startTime
|
||||||
|
|
||||||
expect(result).toBe(baseDesc)
|
expect(result).toBe(baseDesc)
|
||||||
// AbortController timeout should trigger around 5-6 seconds
|
// AbortController timeout should trigger around 5-6 seconds. A few ms
|
||||||
expect(elapsed).toBeGreaterThanOrEqual(5000)
|
// of tolerance below 5000 absorbs normal setTimeout/Date.now() jitter
|
||||||
|
// between the two clock reads (observed flake: 4999ms).
|
||||||
|
expect(elapsed).toBeGreaterThanOrEqual(4990)
|
||||||
expect(elapsed).toBeLessThan(7000)
|
expect(elapsed).toBeLessThan(7000)
|
||||||
}, { timeout: 10000 })
|
}, { timeout: 10000 })
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user