P3.5: Add queue dispatch tests

New src/app/run_test.go exercises the execution mode + overlap policy
dispatch paths added in P3.3, reusing the fake runJob seam:

- parallel mode starts all due jobs concurrently
- sequential mode serializes due jobs one at a time
- skip overlap policy drops a re-fire while running (no Pending)
- queue overlap policy marks Pending and re-runs after the run finishes
- RunNow refuses a manual run while another job runs in sequential mode

Helpers prime NextDue to the past and tick at the wall clock so a started
job (advanced an hour out) does not spuriously re-fire.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-06-23 08:02:20 +03:00
parent 94a8dcc62a
commit 6b8f9a4ccf
2 changed files with 289 additions and 1 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ These land together because both edit `domain/job.go` and `storage/store.go`.
- [x] P3.2 — Split dispatch into `app/run.go`
- [x] P3.3 — Rework `RunDue`/`executeRun` for mode + overlap policy
- [x] P3.4 — Settings Queue selects
- [ ] P3.5 — Queue tests
- [x] P3.5 — Queue tests
### Phase 4 — Notifications + Command browse
- [ ] P4.1 — Failure notifications