Skip to content

fix(test): 修复小内存机型下 planVariants 重试方案判重失败 - #130

Open
shivamcuj wants to merge 1 commit into
RoutineMiku:mainfrom
shivamcuj:fix-test-plan-variants-uniqueness
Open

shivamcuj wants to merge 1 commit into
RoutineMiku:mainfrom
shivamcuj:fix-test-plan-variants-uniqueness

Conversation

@shivamcuj

Copy link
Copy Markdown

Description (说明)

  • EN: Fix assertion failure in test/auto-test.js where planVariants schemes were falsely detected as duplicates on hosts with constrained free RAM (< 3GB). On such machines, memoryMB is clamped to 2048, causing both Variant 3 (software fallback) and Variant 4 (last-resort cold boot with 2 cores) to evaluate to identical keys because cores and lastResort were omitted from the test assertion key.
  • ZH: 修复 test/auto-test.js 中小内存/低空闲内存机型(freeMB < 3072)下,重试矩阵判重失败的问题。此类机器上 chooseProfile 会将 memoryMB 收敛至 2048,导致方案 3(软件模拟)与方案 4(2 核保底冷启动)在测试断言中生成的键完全一致。将 cores 与 lastResort 纳入 keys 后,所有机型配置均能正常通过。

Tests passed (测试结果)

  • npm test -> 100% Passed (141/141 passed in auto-test.js).

On hosts with constrained free RAM (freeMB < 3072), chooseProfile clamps memoryMB to 2048. As a result, variant 3 (software fallback) and variant 4 (conservative cold boot with lastResort=true and cores=2) shared the exact same key in auto-test, causing assertion failure. Include cores and lastResort in uniqueness keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant