Skip to content

Commit 2ab82f0

Browse files
author
Zane
committed
fix(CLI): align gateway-rpc timeout fallback
1 parent 6a56076 commit 2ab82f0

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/cli/gateway-rpc.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,15 @@ describe("gateway-rpc timeout validation", () => {
4343
}),
4444
);
4545
});
46+
47+
it("uses the CLI default timeout when timeout is omitted", async () => {
48+
await callGatewayFromCli("health", { json: true });
49+
50+
expect(callGateway).toHaveBeenCalledWith(
51+
expect.objectContaining({
52+
method: "health",
53+
timeoutMs: 30_000,
54+
}),
55+
);
56+
});
4657
});

src/cli/gateway-rpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function callGatewayFromCli(
4040
method,
4141
params,
4242
expectFinal: extra?.expectFinal ?? Boolean(opts.expectFinal),
43-
timeoutMs: resolveTimeoutMs(opts.timeout, 10_000),
43+
timeoutMs: resolveTimeoutMs(opts.timeout, 30_000),
4444
clientName: GATEWAY_CLIENT_NAMES.CLI,
4545
mode: GATEWAY_CLIENT_MODES.CLI,
4646
}),

0 commit comments

Comments
 (0)