mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 16:14:58 +00:00
perf(test): shrink subagent announce fast-mode settle waits
This commit is contained in:
@@ -929,26 +929,16 @@ describe("subagent announce formatting", () => {
|
||||
childRunId: "run-1",
|
||||
requesterSessionKey: "main",
|
||||
requesterDisplayKey: "main",
|
||||
...defaultOutcomeAnnounce,
|
||||
task: "first task",
|
||||
timeoutMs: 1000,
|
||||
cleanup: "keep",
|
||||
waitForCompletion: false,
|
||||
startedAt: 10,
|
||||
endedAt: 20,
|
||||
outcome: { status: "ok" },
|
||||
});
|
||||
await runSubagentAnnounceFlow({
|
||||
childSessionKey: "agent:main:subagent:worker",
|
||||
childRunId: "run-2",
|
||||
requesterSessionKey: "main",
|
||||
requesterDisplayKey: "main",
|
||||
...defaultOutcomeAnnounce,
|
||||
task: "second task",
|
||||
timeoutMs: 1000,
|
||||
cleanup: "keep",
|
||||
waitForCompletion: false,
|
||||
startedAt: 10,
|
||||
endedAt: 20,
|
||||
outcome: { status: "ok" },
|
||||
});
|
||||
} finally {
|
||||
nowSpy.mockRestore();
|
||||
@@ -1482,13 +1472,8 @@ describe("subagent announce formatting", () => {
|
||||
childRunId: "run-leaf-missing-fallback",
|
||||
requesterSessionKey: "agent:main:subagent:orchestrator",
|
||||
requesterDisplayKey: "agent:main:subagent:orchestrator",
|
||||
task: "do thing",
|
||||
timeoutMs: 1000,
|
||||
...defaultOutcomeAnnounce,
|
||||
cleanup: "delete",
|
||||
waitForCompletion: false,
|
||||
startedAt: 10,
|
||||
endedAt: 20,
|
||||
outcome: { status: "ok" },
|
||||
});
|
||||
|
||||
expect(didAnnounce).toBe(false);
|
||||
@@ -1529,13 +1514,8 @@ describe("subagent announce formatting", () => {
|
||||
childRunId: testCase.childRunId,
|
||||
requesterSessionKey: "agent:main:main",
|
||||
requesterDisplayKey: "main",
|
||||
...defaultOutcomeAnnounce,
|
||||
task: testCase.task,
|
||||
timeoutMs: 1000,
|
||||
cleanup: "keep",
|
||||
waitForCompletion: false,
|
||||
startedAt: 10,
|
||||
endedAt: 20,
|
||||
outcome: { status: "ok" },
|
||||
...(testCase.expectsCompletionMessage ? { expectsCompletionMessage: true } : {}),
|
||||
});
|
||||
|
||||
@@ -1657,13 +1637,8 @@ describe("subagent announce formatting", () => {
|
||||
childRunId: testCase.childRunId,
|
||||
requesterSessionKey: testCase.requesterSessionKey,
|
||||
requesterDisplayKey: testCase.requesterDisplayKey,
|
||||
...defaultOutcomeAnnounce,
|
||||
task: "QA task",
|
||||
timeoutMs: 1000,
|
||||
cleanup: "keep",
|
||||
waitForCompletion: false,
|
||||
startedAt: 10,
|
||||
endedAt: 20,
|
||||
outcome: { status: "ok" },
|
||||
});
|
||||
|
||||
expect(didAnnounce, testCase.name).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user