mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 06:41:08 +00:00
test: align embedded teardown regression harness
This commit is contained in:
@@ -257,7 +257,13 @@ describe("runEmbeddedAttempt context engine sessionKey forwarding", () => {
|
||||
hoisted.acquireSessionWriteLockMock.mockResolvedValue({
|
||||
release: releaseMock,
|
||||
});
|
||||
hoisted.flushPendingToolResultsAfterIdleMock.mockRejectedValueOnce(new Error("flush failed"));
|
||||
let flushCallCount = 0;
|
||||
hoisted.flushPendingToolResultsAfterIdleMock.mockImplementation(async () => {
|
||||
flushCallCount += 1;
|
||||
if (flushCallCount >= 2) {
|
||||
throw new Error("flush failed");
|
||||
}
|
||||
});
|
||||
|
||||
const result = await createContextEngineAttemptRunner({
|
||||
contextEngine: {
|
||||
|
||||
@@ -157,6 +157,7 @@ vi.mock("../google.js", () => ({
|
||||
logToolSchemasForGoogle: () => {},
|
||||
sanitizeSessionHistory: async ({ messages }: { messages: unknown[] }) => messages,
|
||||
sanitizeToolsForGoogle: ({ tools }: { tools: unknown[] }) => tools,
|
||||
validateReplayTurns: async ({ messages }: { messages: unknown[] }) => messages,
|
||||
}));
|
||||
|
||||
vi.mock("../../session-file-repair.js", () => ({
|
||||
|
||||
Reference in New Issue
Block a user