mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:50:43 +00:00
test(matrix): harden live QA waits
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user