test(workflow): escalation drain loop reassigns then completes (S-14, refs #15)
Failing tests for BeoordelingEscalatieProcessor: acquire the parked BeoordelingEscaleren jobs, reassign each instance to teamlead, complete the job, and leave a failed reassignment un-completed for redelivery. PumpOnceAsync is stubbed to throw so the suite compiles and fails on the new behaviour only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Big.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// One poll tick of the beoordeling-escalation worker (S-14, ADR-0015): acquire the parked
|
||||
/// <c>BeoordelingEscaleren</c> jobs — the tokens the 14-day boundary timer on <c>Beoordelen</c> spawns
|
||||
/// — reassign each instance's still-open <c>Beoordelen</c> task to the teamlead, and complete the job.
|
||||
/// A job that fails is logged and left un-completed so Flowable redelivers it (§8.6). Split out from
|
||||
/// the hosted pump so the acquire→reassign→complete logic is unit-testable without a running host.
|
||||
/// </summary>
|
||||
public sealed class BeoordelingEscalatieProcessor(
|
||||
IBeoordelingEscalatieClient client,
|
||||
ILogger<BeoordelingEscalatieProcessor> logger)
|
||||
{
|
||||
/// <summary>Acquire and process up to <paramref name="maxJobs"/> escalations. Returns the number acquired.</summary>
|
||||
public Task<int> PumpOnceAsync(int maxJobs, CancellationToken ct = default)
|
||||
=> throw new NotImplementedException();
|
||||
}
|
||||
Reference in New Issue
Block a user