feat: fence scheduler next-due updates (AEG-V15-036)
Adds dispatch revision CAS to dispatched, skip, and release schedule mutations. Targeted Release evidence: 8/8 passed. PostgreSQL concurrency rehearsal remains required; WBS stays IN_PROGRESS.
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
using System.Reflection;
|
||||
using KArtSell.Modules.ModelOperations.Infrastructure;
|
||||
|
||||
namespace KArtSell.ModelOperations.UnitTests;
|
||||
|
||||
public sealed class DapperModelScheduleRepositoryContractTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("DispatchedSql")]
|
||||
[InlineData("AdvanceSql")]
|
||||
[InlineData("ReleaseSql")]
|
||||
public void Every_next_due_mutation_requires_the_acquired_dispatch_revision(string fieldName)
|
||||
{
|
||||
var sql = (string?)typeof(DapperModelScheduleRepository)
|
||||
.GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Static)
|
||||
?.GetRawConstantValue();
|
||||
|
||||
Assert.NotNull(sql);
|
||||
Assert.Contains("dispatch_revision = @ExpectedDispatchRevision", sql, StringComparison.Ordinal);
|
||||
Assert.Contains("lease_owner = @LeaseOwner", sql, StringComparison.Ordinal);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user