Repository navigation
test(web): 129 模型合并用例显式超时,消除 provider-settings 的 CI 随机红 - #516
Open
Qiyuanqiii wants to merge 1 commit into
Open
Qiyuanqiii wants to merge 1 commit into
Qiyuanqiii wants to merge 1 commit into
Conversation
The over-limit fixture renders 128 model policies plus image selectors and runs around a second in isolation, so the 5s default left too little headroom on a contended CI worker. Scope a 15s timeout to this case instead of raising the global limit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2026-10-29 本地全量跑(2873 项)时,
provider-settings.test.tsx > refuses an over-limit model merge without silently truncating the draft or selection报Test timed out in 5000ms;同一提交单独复跑 3 次、6 路并行跑整文件、整包复跑都绿,属于负载相关的随机超时。根因不是死循环或异步等待,而是 fixture 本身重:该用例要构造 128 个模型的列表,选中供应商后会把 128 条输出策略、128 个图片能力下拉全部渲染出来,再加一条待合并模型。隔离耗时约 1.0–1.5 秒,默认
testTimeout只有 5000ms,CI 多 worker 争用时余量不够。试过把 userEvent 的delay设为null,只省约 12%,说明主要成本在 129 行控件的渲染,不在事件模拟。修法:只给这个用例显式
{ timeout: 15000 },不抬高全局超时;注释说明 fixture 成本。产品代码与断言不变。验证:
npx vitest run src/v2/components/provider-settings.test.tsx -t "refuses an over-limit model merge" --testTimeout=800:加显式超时前在 800ms 下超时(红),加后同一命令通过,证明 per-test timeout 覆盖全局生效。npx vitest run287 files / 2873 tests 全绿;npm run typecheck、npm run build通过。default_path排除,已人工过一遍,仅新增 options 参数与注释,无逻辑、无安全面变化。边界:纯测试超时配置,无产品行为变化,因此没有做浏览器验收。不涉及协议、OpenAPI、surface、权限或依赖。
CI 结果以本 PR 运行结果为准。