Files
cms-website/docs/adr/ADR-014-测试文件串行执行.md
T
浅念 07483b5ae2 docs: ADR 001–015 落档 + README
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-20 20:56:26 +08:00

7 lines
711 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ADR-014:vitest fileParallelism = false(集成测试文件串行)
- **状态**:已采纳(Task 10 实施发现,阶段 1)
- **决策**:vitest 配置 `fileParallelism: false`,测试文件串行执行。
- **理由**:集成测试共库,清场会做库级 DDL(不可变表 `DISABLE/ENABLE TRIGGER` 对**所有会话**可见)。文件级并行时 A 文件清场窗口会与 B 文件的不可变断言竞态——实测 db.media 清场 disable content_revisions_immutable 期间,db.content 恰好断言该触发器,UPDATE 意外放行。串行执行彻底消除该竞态。
- **权衡**:套件失去文件级并行;但全套件仅数秒,并行无实际收益,确定性优先。