Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cases/base-share/a-duplicated-base-in-the-recent-list.case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default defineBugCase({
title: "A freshly duplicated base is in the recent list",
runner: "duplicate-base-recent-list",
timeoutMs: 240_000,
// Recent bases are user-global state. Another concurrent case may visit its
// own base after this copy and correctly move ahead of it, invalidating this
// checkpoint without reproducing T2571.
serial: true,
bug: {
issue: "T2571",
status: "fixed",
Expand Down
30 changes: 17 additions & 13 deletions e2e-lab.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,22 @@ describe("e2e-lab bug regression runner (e2e)", () => {
});

for (const bugCase of bugCases) {
it.concurrent(
`observes ${bugCase.id} [${bugCase.bug.issue}]`,
{ timeout: bugCase.timeoutMs },
async () => {
logPhase("case:start", { caseId: bugCase.id });
const caseStarted = performance.now();
await runBugCase(bugCase, { app, appUrl, cookie });
logPhase("case:done", {
caseId: bugCase.id,
caseMs: Math.round(performance.now() - caseStarted),
});
},
);
const name = `observes ${bugCase.id} [${bugCase.bug.issue}]`;
const options = { timeout: bugCase.timeoutMs };
const run = async () => {
logPhase("case:start", { caseId: bugCase.id });
const caseStarted = performance.now();
await runBugCase(bugCase, { app, appUrl, cookie });
logPhase("case:done", {
caseId: bugCase.id,
caseMs: Math.round(performance.now() - caseStarted),
});
};

if (bugCase.serial) {
it(name, options, run);
} else {
it.concurrent(name, options, run);
}
}
});
6 changes: 6 additions & 0 deletions framework/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ interface BugCaseBase {
id: string;
title: string;
bug: BugRef;
/**
* Run without overlapping any concurrent case. Use only when the checkpoint
* intentionally observes user-global state that per-case bases cannot
* isolate (for example, the current user's recent-base ordering).
*/
serial?: boolean;
timeoutMs: number;
}

Expand Down