Skip to content

Commit 855912b

Browse files
committed
test(matrix): harden live QA waits
1 parent 6094358 commit 855912b

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

extensions/qa-matrix/src/runners/contract/scenario-catalog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const MATRIX_QA_RESTART_ROOM_KEY = "restart";
8787
export const MATRIX_QA_SECONDARY_ROOM_KEY = "secondary";
8888

8989
const MATRIX_QA_LIVE_MODEL_TIMEOUT_MS = 120_000;
90+
const MATRIX_QA_IMAGE_GENERATION_TIMEOUT_MS = 180_000;
9091
const MATRIX_QA_E2EE_REPLY_TIMEOUT_MS = 150_000;
9192
const MATRIX_QA_E2EE_MEDIA_TIMEOUT_MS = 180_000;
9293

@@ -311,7 +312,7 @@ export const MATRIX_QA_SCENARIOS: MatrixQaScenarioDefinition[] = [
311312
},
312313
{
313314
id: "matrix-room-generated-image-delivery",
314-
timeoutMs: 60_000,
315+
timeoutMs: MATRIX_QA_IMAGE_GENERATION_TIMEOUT_MS,
315316
title: "Matrix generated images deliver as real image attachments while streaming",
316317
topology: MATRIX_QA_MEDIA_ROOM_TOPOLOGY,
317318
configOverrides: {

extensions/qa-matrix/src/runners/contract/scenario-runtime-room.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,10 @@ export async function runSubagentThreadSpawnScenario(context: MatrixQaScenarioCo
297297
const { client, startSince } = await primeMatrixQaDriverScenarioClient(context);
298298
const childToken = buildMatrixQaToken("MATRIX_QA_SUBAGENT_CHILD");
299299
const triggerBody = [
300-
`${context.sutUserId} Use sessions_spawn for this QA check.`,
301-
`task="Reply exactly \`${childToken}\`. This is the marker."`,
302-
"label=matrix-thread-subagent thread=true mode=session runTimeoutSeconds=30",
300+
`${context.sutUserId} Call sessions_spawn now for this QA check.`,
301+
`Use task="Reply exactly \`${childToken}\`. This is the marker."`,
302+
"Use label=matrix-thread-subagent thread=true mode=session runTimeoutSeconds=60.",
303+
"Do not answer with the marker yourself.",
303304
].join(" ");
304305
const driverEventId = await client.sendTextMessage({
305306
body: triggerBody,

extensions/qa-matrix/src/runners/contract/scenarios.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ describe("matrix live qa scenarios", () => {
169169
expect(scenarios.get("matrix-subagent-thread-spawn")?.timeoutMs).toBeGreaterThanOrEqual(
170170
120_000,
171171
);
172+
expect(scenarios.get("matrix-room-generated-image-delivery")?.timeoutMs).toBeGreaterThanOrEqual(
173+
180_000,
174+
);
172175
expect(scenarios.get("matrix-e2ee-restart-resume")?.timeoutMs).toBeGreaterThanOrEqual(150_000);
173176
expect(scenarios.get("matrix-e2ee-artifact-redaction")?.timeoutMs).toBeGreaterThanOrEqual(
174177
150_000,
@@ -1356,7 +1359,12 @@ describe("matrix live qa scenarios", () => {
13561359
});
13571360

13581361
expect(sendTextMessage).toHaveBeenCalledWith({
1359-
body: expect.stringContaining("Use sessions_spawn for this QA check"),
1362+
body: expect.stringContaining("Call sessions_spawn now for this QA check"),
1363+
mentionUserIds: ["@sut:matrix-qa.test"],
1364+
roomId: "!main:matrix-qa.test",
1365+
});
1366+
expect(sendTextMessage).toHaveBeenCalledWith({
1367+
body: expect.stringContaining("runTimeoutSeconds=60"),
13601368
mentionUserIds: ["@sut:matrix-qa.test"],
13611369
roomId: "!main:matrix-qa.test",
13621370
});

0 commit comments

Comments
 (0)