mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Cron: drop legacy relay expectations
This commit is contained in:
@@ -86,7 +86,7 @@ describe("CronService delivery plan consistency", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("treats delivery object without mode as announce", async () => {
|
||||
it("treats delivery object without mode as announce without reviving legacy relay fallback", async () => {
|
||||
await withCronService({}, async ({ cron, enqueueSystemEvent }) => {
|
||||
const job = await addIsolatedAgentTurnJob(cron, {
|
||||
name: "partial-delivery",
|
||||
@@ -96,10 +96,8 @@ describe("CronService delivery plan consistency", () => {
|
||||
|
||||
const result = await cron.run(job.id, "force");
|
||||
expect(result).toEqual({ ok: true, ran: true });
|
||||
expect(enqueueSystemEvent).toHaveBeenCalledWith(
|
||||
"Cron: done",
|
||||
expect.objectContaining({ agentId: undefined }),
|
||||
);
|
||||
expect(enqueueSystemEvent).not.toHaveBeenCalled();
|
||||
expect(cron.getJob(job.id)?.state.lastDeliveryStatus).toBe("unknown");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ describe("cron isolated job HEARTBEAT_OK summary suppression (#32013)", () => {
|
||||
expect(requestHeartbeatNow).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("still enqueues real cron summaries as system events", async () => {
|
||||
it("does not revive legacy main-session relay for real cron summaries", async () => {
|
||||
const { storePath } = await makeStorePath();
|
||||
const now = Date.now();
|
||||
|
||||
@@ -109,10 +109,7 @@ describe("cron isolated job HEARTBEAT_OK summary suppression (#32013)", () => {
|
||||
|
||||
await runScheduledCron(cron);
|
||||
|
||||
// Real summaries SHOULD be enqueued.
|
||||
expect(enqueueSystemEvent).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Weather update"),
|
||||
expect.objectContaining({ agentId: undefined }),
|
||||
);
|
||||
expect(enqueueSystemEvent).not.toHaveBeenCalled();
|
||||
expect(requestHeartbeatNow).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user