Repository navigation
test: cover schedule:run and schedule:work and pin framework#1572 - #177
Merged
Merged
Conversation
hwbrzzl
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/feature/schedule_test.gosuite that provesschedule:runexecutes every event due in the current minute exactly once per external trigger and then exits, asserting exact counts per event (EveryMinute,EverySecond, a0 0 30 2 *expression that can never be due, and an@every 1hevent).schedule:workstays up: a sub-minute event reaches a second run beforeShutdownstops the loop, the command returns only after shutdown, andschedule:workis registered on the app. The suite claims the only cron loop throughapp.disabled_runners.github.com/goravel/frameworkto master HEADv1.18.1-0.20261118072219-cc4bb811d18ein bothrequireandreplace, withgo.sumregenerated.Why
schedule:runandschedule:workhad no feature coverage, so the difference between them was only implied by the framework source: one runs the due events for the current tick and returns, the other keeps following the schedule until it is shut down. This suite pins that behavior down for goravel/framework#1572 with exact per-event counts, and uses anEverySecondevent as the pivot — a single tick can only ever reach one run, so a count of two is proof thatschedule:workreally keeps ticking, while a zero for the never-due expression and the@every 1hevent shows unrelated events are left alone. Because the boot-time scheduler would otherwise be a second loop in the same process, the suite disablesgoravel:scheduleand owns the only cron loop itself.The dependency moves to framework master HEAD, which also carries the unrelated queue fix #1618; no drift showed up in the neighbouring suites (
TestQueueMultiQueueTestSuite,TestConsoleTestSuite,TestDisabledRunnersTestSuiteall pass on this pin), so nothing outside the new test was touched.