perf(test): drop redundant benchmark cli spawn

This commit is contained in:
Peter Steinberger 2026-07-06 22:44:30 -04:00
parent 5df7942f70
commit 4fa8af486f

View file

@ -35,7 +35,6 @@ function readRestartIntentRow(env: NodeJS.ProcessEnv) {
describe("gateway restart benchmark script", () => {
let helpResult: ReturnType<typeof spawnSync>;
let unknownArgsResult: ReturnType<typeof spawnSync>;
let duplicateCaseResult: ReturnType<typeof spawnSync>;
beforeAll(() => {
helpResult = spawnSync(
@ -62,26 +61,6 @@ describe("gateway restart benchmark script", () => {
},
},
);
duplicateCaseResult = spawnSync(
process.execPath,
[
"--import",
"tsx",
"scripts/bench-gateway-restart.ts",
"--case",
"skipChannels",
"--case",
"skipChannels",
],
{
cwd: process.cwd(),
encoding: "utf8",
env: {
...process.env,
NODE_NO_WARNINGS: "1",
},
},
);
});
it("prints help without running benchmark cases", () => {
@ -144,13 +123,6 @@ describe("gateway restart benchmark script", () => {
expect(unknownArgsResult.stderr).not.toContain("\n at ");
});
it("reports duplicate benchmark cases without a stack trace", () => {
expect(duplicateCaseResult.status).toBe(1);
expect(duplicateCaseResult.stdout).toBe("");
expect(duplicateCaseResult.stderr.trim()).toBe('Duplicate --case "skipChannels"');
expect(duplicateCaseResult.stderr).not.toContain("\n at ");
});
it("guards the SIGUSR1 restart benchmark on Windows", () => {
expect(() => testing.ensureSupportedRestartPlatform("linux")).not.toThrow();
expect(() => testing.ensureSupportedRestartPlatform("darwin")).not.toThrow();