Add null check to canRun method in CancelStaleWorkflowCronJob

Ensure the canRun method in CancelStaleWorkflowCronJob returns true when the cron job execution is null. This change includes updating the corresponding test case to cover the new behavior.
This commit is contained in:
2024-11-04 14:16:52 +01:00
parent 4dc2348893
commit 5c0a383909
2 changed files with 9 additions and 0 deletions

View File

@@ -104,6 +104,11 @@ class CancelStaleWorkflowCronJobTest extends TestCase
(new CronJobExecution('last-canceled-workflow-id'))->setLastEnd(new \DateTimeImmutable('2023-12-31 00:00:01', new \DateTimeZone('+00:00'))),
false,
];
yield [
null,
true
];
}
private function buildMessageBus(bool $expectDispatchAtLeastOnce = false): MessageBusInterface