-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
After deflake phase 1 (PR #46), this test remains flaky at 1/5 failure rate.
Failing File
tests/run.scm-lite.integration.test.ts
Root Cause
Port conflicts and startup race conditions causing intermittent failures.
Action Plan
- Use ephemeral port:
server.listen(0)then readserver.address().port - Await readiness:
await once(server, 'listening')before sending requests - Serialize the suite: avoid
test.concurrentin this file - Ensure full teardown:
afterAllcloses server, destroys clientsawait new Promise(r => setTimeout(r, 50))after close to drain timers
- If worker/child process involved: add unique namespace (env suffix) per test and kill on teardown
Definition of Done
- Test passes 5/5 runs consistently
- Ephemeral port allocation implemented
- Proper readiness awaiting
- Clean teardown with timer drain
Proof Command
for i in {1..5}; do npx vitest run tests/run.scm-lite.integration.test.ts; doneRelated
- PR test(deflake): stabilize flaky tests - variance ±4→±1 (-3 worst-case) #46 (deflake phase 1)
- Part of stabilization effort to reach ≤3 failing files
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels