mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
perf(test): drop redundant benchmark cli spawn
This commit is contained in:
parent
5df7942f70
commit
4fa8af486f
1 changed files with 0 additions and 28 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue