test(matrix): harden live QA waits

This commit is contained in:
Peter Steinberger
2026-04-23 09:36:17 +01:00
parent 6094358311
commit 855912b25c
3 changed files with 15 additions and 5 deletions

View File

@@ -87,6 +87,7 @@ export const MATRIX_QA_RESTART_ROOM_KEY = "restart";
export const MATRIX_QA_SECONDARY_ROOM_KEY = "secondary";
const MATRIX_QA_LIVE_MODEL_TIMEOUT_MS = 120_000;
const MATRIX_QA_IMAGE_GENERATION_TIMEOUT_MS = 180_000;
const MATRIX_QA_E2EE_REPLY_TIMEOUT_MS = 150_000;
const MATRIX_QA_E2EE_MEDIA_TIMEOUT_MS = 180_000;
@@ -311,7 +312,7 @@ export const MATRIX_QA_SCENARIOS: MatrixQaScenarioDefinition[] = [
},
{
id: "matrix-room-generated-image-delivery",
timeoutMs: 60_000,
timeoutMs: MATRIX_QA_IMAGE_GENERATION_TIMEOUT_MS,
title: "Matrix generated images deliver as real image attachments while streaming",
topology: MATRIX_QA_MEDIA_ROOM_TOPOLOGY,
configOverrides: {

View File

@@ -297,9 +297,10 @@ export async function runSubagentThreadSpawnScenario(context: MatrixQaScenarioCo
const { client, startSince } = await primeMatrixQaDriverScenarioClient(context);
const childToken = buildMatrixQaToken("MATRIX_QA_SUBAGENT_CHILD");
const triggerBody = [
`${context.sutUserId} Use sessions_spawn for this QA check.`,
`task="Reply exactly \`${childToken}\`. This is the marker."`,
"label=matrix-thread-subagent thread=true mode=session runTimeoutSeconds=30",
`${context.sutUserId} Call sessions_spawn now for this QA check.`,
`Use task="Reply exactly \`${childToken}\`. This is the marker."`,
"Use label=matrix-thread-subagent thread=true mode=session runTimeoutSeconds=60.",
"Do not answer with the marker yourself.",
].join(" ");
const driverEventId = await client.sendTextMessage({
body: triggerBody,

View File

@@ -169,6 +169,9 @@ describe("matrix live qa scenarios", () => {
expect(scenarios.get("matrix-subagent-thread-spawn")?.timeoutMs).toBeGreaterThanOrEqual(
120_000,
);
expect(scenarios.get("matrix-room-generated-image-delivery")?.timeoutMs).toBeGreaterThanOrEqual(
180_000,
);
expect(scenarios.get("matrix-e2ee-restart-resume")?.timeoutMs).toBeGreaterThanOrEqual(150_000);
expect(scenarios.get("matrix-e2ee-artifact-redaction")?.timeoutMs).toBeGreaterThanOrEqual(
150_000,
@@ -1356,7 +1359,12 @@ describe("matrix live qa scenarios", () => {
});
expect(sendTextMessage).toHaveBeenCalledWith({
body: expect.stringContaining("Use sessions_spawn for this QA check"),
body: expect.stringContaining("Call sessions_spawn now for this QA check"),
mentionUserIds: ["@sut:matrix-qa.test"],
roomId: "!main:matrix-qa.test",
});
expect(sendTextMessage).toHaveBeenCalledWith({
body: expect.stringContaining("runTimeoutSeconds=60"),
mentionUserIds: ["@sut:matrix-qa.test"],
roomId: "!main:matrix-qa.test",
});