mirror of https://github.com/openclaw/openclaw.git
test: align embedded teardown regression harness
This commit is contained in:
parent
5267e0da74
commit
52b3bb46bb
|
|
@ -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", () => ({
|
||||
|
|
|
|||
Loading…
Reference in New Issue