mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:50:45 +00:00
fix(gateway): quiet benchmark watch output
This commit is contained in:
@@ -89,6 +89,7 @@ describe("gateway-watch tmux wrapper", () => {
|
||||
expect(code).toBe(0);
|
||||
const command = spawnSync.mock.calls[1]?.[1]?.[6] as string;
|
||||
expect(command).toContain("'OPENCLAW_RUN_NODE_CPU_PROF_DIR=.artifacts/gateway-watch-profiles'");
|
||||
expect(command).toContain("'OPENCLAW_TRACE_SYNC_IO=0'");
|
||||
expect(command).not.toContain("--benchmark");
|
||||
expect(command).toContain("'gateway'");
|
||||
expect(command).toContain("'--force'");
|
||||
@@ -97,6 +98,31 @@ describe("gateway-watch tmux wrapper", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("preserves explicit sync I/O tracing in benchmark mode", () => {
|
||||
const stdout = createOutput();
|
||||
const stderr = createOutput();
|
||||
const spawnSync = vi
|
||||
.fn()
|
||||
.mockReturnValueOnce({ status: 1, stdout: "", stderr: "" })
|
||||
.mockReturnValueOnce({ status: 0, stdout: "", stderr: "" })
|
||||
.mockReturnValueOnce({ status: 0, stdout: "", stderr: "" })
|
||||
.mockReturnValueOnce({ status: 0, stdout: "", stderr: "" });
|
||||
|
||||
const code = runGatewayWatchTmuxMain({
|
||||
args: ["gateway", "--force", "--benchmark"],
|
||||
cwd: "/repo",
|
||||
env: { OPENCLAW_TRACE_SYNC_IO: "1", SHELL: "/bin/zsh" },
|
||||
nodePath: "/node",
|
||||
spawnSync,
|
||||
stderr: stderr.stream,
|
||||
stdout: stdout.stream,
|
||||
});
|
||||
|
||||
expect(code).toBe(0);
|
||||
const command = spawnSync.mock.calls[1]?.[1]?.[6] as string;
|
||||
expect(command).toContain("'OPENCLAW_TRACE_SYNC_IO=1'");
|
||||
});
|
||||
|
||||
it("can remove --force from benchmarked watch runs", () => {
|
||||
const stdout = createOutput();
|
||||
const stderr = createOutput();
|
||||
|
||||
Reference in New Issue
Block a user