Imported as a linear vendor commit so forge rebases do not replay the upstream root tree. git-subtree-dir: third_party/pi git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
35 lines
992 B
TypeScript
35 lines
992 B
TypeScript
import { spawnSync } from "node:child_process";
|
|
import { fileURLToPath } from "node:url";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("delta tracker retention across GC jobs", () => {
|
|
it.each([
|
|
"aborted-payload",
|
|
"unadopted-prepared",
|
|
"draft-proxies",
|
|
"settled-lifecycle",
|
|
"obsolete-revisions",
|
|
"retained-settled-prepared",
|
|
"retained-settled-change",
|
|
"retained-settled-proxy",
|
|
"retained-large-settled-proxy",
|
|
"retained-large-placement-proxies",
|
|
"stale-unprepared-change",
|
|
"same-job-fast-cleanup",
|
|
"same-job-folded-ops-cleanup",
|
|
"lifecycle-churn",
|
|
])(
|
|
"validates %s retention semantics",
|
|
(scenario) => {
|
|
const child = spawnSync(
|
|
process.execPath,
|
|
["--expose-gc", fileURLToPath(new URL("./retention.worker.ts", import.meta.url)), scenario],
|
|
{ encoding: "utf8", timeout: 60_000 },
|
|
);
|
|
expect(child.error, child.stderr).toBeUndefined();
|
|
expect(child.status, `${child.stdout}\n${child.stderr}`).toBe(0);
|
|
},
|
|
65_000,
|
|
);
|
|
});
|