























@@ -111,12 +111,13 @@ describe("cron schedule error isolation", () => {
111111recomputeNextRuns(state);
112112113113expect(state.deps.log.warn).toHaveBeenCalledWith(
114-expect.objectContaining({
114+{
115115jobId: "bad-job",
116116name: "Bad Job",
117117errorCount: 1,
118-}),
119-expect.stringContaining("failed to compute next run"),
118+err: "TypeError: CronPattern: invalid configuration format ('not valid'), exactly five, six, or seven space separated parts are required.",
119+},
120+"cron: failed to compute next run for job (skipping)",
120121);
121122});
122123@@ -135,12 +136,13 @@ describe("cron schedule error isolation", () => {
135136expect(badJob.enabled).toBe(false);
136137expect(badJob.state.scheduleErrorCount).toBe(3);
137138expect(state.deps.log.error).toHaveBeenCalledWith(
138-expect.objectContaining({
139+{
139140jobId: "bad-job",
140141name: "Bad Job",
141142errorCount: 3,
142-}),
143-expect.stringContaining("auto-disabled job"),
143+err: "TypeError: CronPattern: invalid configuration format ('garbage'), exactly five, six, or seven space separated parts are required.",
144+},
145+"cron: auto-disabled job after repeated schedule errors",
144146);
145147});
146148此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。