fix(qa-lab): cap agent wait timeout payloads

This commit is contained in:
Vincent Koc
2026-06-21 23:34:23 +02:00
parent 735505442c
commit 1c63da09d8
2 changed files with 4 additions and 3 deletions

View File

@@ -698,7 +698,7 @@ describe("qa suite runtime agent process helpers", () => {
expect(gatewayCall).toHaveBeenCalledWith(
"agent.wait",
{ runId: "run-oversized", timeoutMs: 9e15 },
{ runId: "run-oversized", timeoutMs: MAX_TIMER_TIMEOUT_MS },
{ timeoutMs: MAX_TIMER_TIMEOUT_MS },
);
});

View File

@@ -347,15 +347,16 @@ async function waitForAgentRun(
runId: string,
timeoutMs = 30_000,
) {
const waitTimeoutMs = resolveTimerTimeoutMs(timeoutMs, 30_000);
try {
return (await env.gateway.call(
"agent.wait",
{
runId,
timeoutMs,
timeoutMs: waitTimeoutMs,
},
{
timeoutMs: resolveQaGatewayTimeoutWithGraceMs(timeoutMs),
timeoutMs: resolveQaGatewayTimeoutWithGraceMs(waitTimeoutMs),
},
)) as { status?: string; error?: string };
} catch (error) {