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>
20 lines
1004 B
C#
20 lines
1004 B
C#
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();
|
|
}
|