Skip to content

Commit 41ee218

Browse files
test(scenarios): split the three-shape no-skip refresh case into one case per shape (#35531)
Clause-②: no Metadata-protocol: none ## 维护者速读 1. 用户能看到什么变化:用户无感,只改了一条测试的写法。 2. 为什么做:这条测试把三次完整的画廊刷新塞进一个用例,在合并队列的繁忙机器上超过五秒上限而失败,挡住了别的改动入队。 3. 出错会怎样:最坏只是这条测试本身失败,不影响任何发布内容,回滚即可。 4. 要你做什么:无。 ## 席位核对 ### What changes `packages/qa/scenarios/test/export/refresh.test.ts`: the case "does not skip when one listed app is on an older version, or when the index lists no app" looped over three gallery shapes, each running a full `galleryRefresh` (git init, the fixture crm run, a commit) inside vitest's default 5000 ms per-test budget. It is now an `it.each` over the three shapes (one listed app older; an index listing no app; no index), each its own case with the same two assertions (`out.kind` is `committed`, exactly one run plan). No assertion skipped, removed or weakened; no timeout raised. Test-only, one file. Why: the merge queue (run 44533961485, job 135595686454, Test Core 2/10) timed this case out at 5714 ms against the 5000 ms budget, while PR CI passed it at 3804 ms; a single refresh is about 1.4 to 1.5 s there, so three in one case sit on the budget edge on a loaded shard. ### Tests Local run of the file, `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 --reporter=verbose test/export/refresh.test.ts`, under the shared verify lock (shared-box timings): <details><summary>Before (origin/main f727061): 17/17 pass</summary> ``` does not skip when one listed app is on an older version, or when the index lists no app 910ms Test Files 1 passed (1) Tests 17 passed (17) ``` </details> <details><summary>After (branch head 36587a3, same tree as the measured ce5cb4ba53): 19/19 pass</summary> ``` does not skip when one listed app is on an older version 560ms does not skip when the index lists no app 200ms does not skip when the gallery has no index 187ms Test Files 1 passed (1) Tests 19 passed (19) ``` </details> `pnpm --filter @objectstack/scenarios typecheck`: exit 0 (the test file is in the tsc program, counted with `--listFiles`). ### Acceptance notes - The first case of the three keeps most of the old wall time locally (it pays the first crm-fixture run); on the queue shard each case is expected near the 1.4 to 1.5 s single-refresh reading, well inside 5000 ms. - No changeset: the test file is not in the package's `files[]` (`dist`, `README.md`, `CHANGELOG.md`), so nothing publishes; labelled `skip-changeset`. ### Verification <details><summary>Derived gate families (dispatch-gates --commands, 49 families)</summary> 48 ran with exit 0. `pnpm check:dual-build-cjs-loads` exited 3 (PREREQUISITE NOT MET: reads a full build's dist), so NOT MEASURED locally; CI's Lint and Repo Gates job measures it. `dispatch-gates --ran` reconciliation: 49 accounted, 48 run, 1 NOT-MEASURED, 0 UNRUN. `overlap-check --branch=HEAD`: VERDICT clean exit 0. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Utp6CaysxGzF62ACvZ1x9x Co-authored-by: Claude <noreply@anthropic.com>
1 parent eed422e commit 41ee218

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

‎packages/qa/scenarios/test/export/refresh.test.ts‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,18 @@ describe('galleryRefresh — the quiet skip', () => {
135135
expect(remoteRefs(remote)).toBe(refs);
136136
});
137137

138-
it('does not skip when one listed app is on an older version, or when the index lists no app', async () => {
139-
for (const apps of [[app('crm_account_with_contacts', PINNED), app('order_to_cash', '18.2.0')], [], undefined]) {
140-
const { dir } = gallery(apps);
141-
const h = harness(PINNED);
142-
const out = await galleryRefresh(options(dir), h.deps);
143-
expect(out.kind).toBe('committed');
144-
expect(h.plans).toHaveLength(1);
145-
}
138+
// One case per gallery shape: each runs a full refresh (git init, the crm run, a commit), so a
139+
// loop over all three in one case outgrew the default per-test budget on a loaded CI shard.
140+
it.each<[string, () => GalleryApp[] | undefined]>([
141+
['one listed app is on an older version', () => [app('crm_account_with_contacts', PINNED), app('order_to_cash', '18.2.0')]],
142+
['the index lists no app', () => []],
143+
['the gallery has no index', () => undefined],
144+
])('does not skip when %s', async (_shape, apps) => {
145+
const { dir } = gallery(apps());
146+
const h = harness(PINNED);
147+
const out = await galleryRefresh(options(dir), h.deps);
148+
expect(out.kind).toBe('committed');
149+
expect(h.plans).toHaveLength(1);
146150
});
147151

148152
it('skips when a remote-tracking export/<version> branch exists: that refresh awaits review', async () => {

0 commit comments

Comments
 (0)