perf(test): skip manual lane settle delay in unit tests

This commit is contained in:
Peter Steinberger
2026-04-20 15:51:02 +01:00
parent b4e3bbc57b
commit 372ca5e81e
2 changed files with 7 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ describe("runQaManualLane", () => {
alternateModel: "mock-openai/gpt-5.4-alt",
message: "check the kickoff file",
timeoutMs: 5_000,
replySettleMs: 0,
});
expect(startQaProviderServer).toHaveBeenCalledWith("mock-openai");
@@ -114,6 +115,7 @@ describe("runQaManualLane", () => {
alternateModel: "openai/gpt-5.4",
message: "check the kickoff file",
timeoutMs: 5_000,
replySettleMs: 0,
});
expect(startQaProviderServer).toHaveBeenCalledWith("live-frontier");

View File

@@ -19,6 +19,7 @@ type QaManualLaneParams = {
thinkingDefault?: QaThinkingLevel;
message: string;
timeoutMs?: number;
replySettleMs?: number;
};
function resolveManualLaneTimeoutMs(params: {
@@ -108,7 +109,10 @@ export async function runQaManualLane(params: QaManualLaneParams) {
{ timeoutMs: timeoutMs + 5_000 },
)) as { status?: string; error?: string };
await sleep(500);
const replySettleMs = params.replySettleMs ?? 500;
if (replySettleMs > 0) {
await sleep(replySettleMs);
}
const reply =
lab.state