chore: pin desktop suite timeout to 25m / 为桌面套件固定 25 分钟超时

Makefile desktop-test/-short/-times and ci.yml (via scripts/desktop-windows-go-tests.mjs testArgs) pass -timeout=25m: the full suite needs ~25 min locally, past go's 10-minute default panic. The -short target alone was measured at 933s.
This commit is contained in:
F committed 2026-09-30 20:05:22 +08:00
1 parent 9e32035f32
commit a311dd464e
4 files changed
+10 -6

No files matched your search

+1 -1
View File
@@ -1299,7 +1299,7 @@ jobs:
if: ${{ !cancelled() && needs.desktop-prepare.result == 'success' && ((github.event_name != 'pull_request' && needs.changes.outputs.notes_only != 'true') || needs.changes.outputs.native != 'false') }}
runs-on: windows-latest
# Independent runners prevent valid groups from consuming each other's
# step deadline. Go retains its default per-package ten-minute timeout.
# step deadline. Each group runs with go -timeout=25m (driver testArgs).
timeout-minutes: 45
strategy:
fail-fast: false
+5 -3
View File
@@ -52,14 +52,16 @@ lint-cross:
test:
go test ./...
# The desktop suite needs ~25m locally, past go's default 10m test alarm
# (the TaggedHistory migrations alone are ~389s), so these targets pin a wider one.
desktop-test:
cd desktop && go test .
cd desktop && go test -timeout=25m .
desktop-test-short:
cd desktop && go test -short .
cd desktop && go test -short -timeout=25m .
desktop-test-times:
cd desktop && go test -count=1 -json . | python3 ../scripts/desktop-test-times.py
cd desktop && go test -count=1 -timeout=25m -json . | python3 ../scripts/desktop-test-times.py
sdk-test:
cd sdk/go && go test ./...
+3 -1
View File
@@ -61,7 +61,9 @@ export function verifyInventory(inventory, requireProbe = process.platform === "
export function testArgs(group, race = false) {
if (!groups.includes(group)) throw new Error(`Unknown desktop Windows test group: ${group}`);
const { run, skip } = filters[group];
return ["test", ...(race ? ["-race"] : []), ...(run ? ["-run", run] : []), ...(skip ? ["-skip", skip] : []), "./..."];
// go's default alarm is 10m; the desktop race sweep already exceeded it and
// the unpartitioned suite needs ~25m locally. Give every group the headroom.
return ["test", ...(race ? ["-race"] : []), "-timeout=25m", ...(run ? ["-run", run] : []), ...(skip ? ["-skip", skip] : []), "./..."];
}
function main(group, mode) {
+1 -1
View File
@@ -19,7 +19,7 @@ test("every test prefix, example and fuzz seed has exactly one execution owner",
test("all historical releases have an independent bounded execution owner", () => {
for (const [group, name] of Object.entries(historyTests)) {
assert.deepEqual(owners(name), [group]);
assert.deepEqual(testArgs(group, true), ["test", "-race", "-run", `^${name}$`, "./..."]);
assert.deepEqual(testArgs(group, true), ["test", "-race", "-timeout=25m", "-run", `^${name}$`, "./..."]);
}
const source = readFileSync(new URL("../.github/workflows/ci.yml", import.meta.url), "utf8");
const ordinary = source.match(/\n desktop-go:\n([\s\S]*?)(?=\n [a-z][a-z0-9-]*:|$)/)?.[1];