test(tasks): cover direct admission default

This commit is contained in:
pku-xht
2026-08-11 16:57:04 +08:00
parent b5fb52688f
commit 9d173f8333

View File

@@ -197,6 +197,10 @@ describe('LocalTaskService.start', () => {
for (const task of live) task.settle({ status: 'completed' })
})
it('defaults direct construction when the config schema is bypassed', () => {
expect(new LocalTaskService(new Context()).config.maxConcurrentTasksPerOwner).toBe(10)
})
it('rejects before producer start and id allocation, then admits immediately after settlement', async () => {
const ctx = await harness({ maxConcurrentTasksPerOwner: 1 })
const first = producer()