mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 01:44:47 +00:00
test: check auto-reply diagnostics
This commit is contained in:
@@ -2591,7 +2591,7 @@ describe("runReplyAgent transient HTTP retry", () => {
|
||||
|
||||
expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(2);
|
||||
expect(runtimeErrorMock).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Transient HTTP provider error before reply"),
|
||||
'Transient HTTP provider error before reply (521 <!DOCTYPE html><html lang="en-US"><head><title>Web server is down</title></head><body>Cloudflare</body></html>). Retrying once in 2500ms.',
|
||||
);
|
||||
|
||||
const payload = Array.isArray(result) ? result[0] : result;
|
||||
|
||||
@@ -155,10 +155,11 @@ describe("handleBashChatCommand stop", () => {
|
||||
},
|
||||
});
|
||||
|
||||
const result = await handleBashChatCommand(buildElevatedDeniedParams("/bash pwd"));
|
||||
const params = buildElevatedDeniedParams("/bash pwd");
|
||||
const result = await handleBashChatCommand(params);
|
||||
|
||||
expect(resolveSandboxRuntimeStatusSpy).toHaveBeenCalledWith({
|
||||
cfg: expect.any(Object),
|
||||
cfg: params.cfg,
|
||||
sessionKey: "agent:target:telegram:direct:target-session",
|
||||
});
|
||||
expect(result.text).toContain(
|
||||
|
||||
@@ -75,7 +75,9 @@ describe("drainPendingToolTasks", () => {
|
||||
await vi.advanceTimersByTimeAsync(100);
|
||||
|
||||
await expect(drain).resolves.toEqual({ kind: "timeout", remaining: 1 });
|
||||
expect(onTimeout).toHaveBeenCalledWith(expect.stringContaining("1 task(s) still pending"));
|
||||
expect(onTimeout).toHaveBeenCalledWith(
|
||||
"pending tool tasks made no progress within 100ms; proceeding with 1 task(s) still pending to avoid session deadlock",
|
||||
);
|
||||
expect(tasks.size).toBe(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user