test(firstleg): decouple PDA completion from truck
This commit is contained in:
@@ -120,7 +120,7 @@ test('HTTP chain refreshes after stale inventory and keeps one stable PDA identi
|
||||
assert.doesNotMatch(loading, /\/loading\/complete\?tenantId=/)
|
||||
})
|
||||
|
||||
test('downstream finalizer uses the frozen truck-coupled complete contract', () => {
|
||||
test('downstream finalizer uses the frozen loading complete contract without truck coupling', () => {
|
||||
assert.match(convergence, /loadingPlan\?\.status === 'LOADING'/)
|
||||
assert.match(convergence, /!operations\.some\(\(item\) => item\.actionType === 'COMPLETE_LOADING'\)/)
|
||||
assert.match(customs, /\['AWAITING_REVIEW', 'LOADED'\]/)
|
||||
@@ -136,6 +136,8 @@ test('downstream finalizer uses the frozen truck-coupled complete contract', ()
|
||||
assert.doesNotMatch(finalize, /BLOCKED_CONTRACT/)
|
||||
assert.doesNotMatch(finalize, /truck\?\.finalStatus === 'COMPLETED'/)
|
||||
assert.doesNotMatch(finalize, /\/loading\/complete\?tenantId=/)
|
||||
assert.doesNotMatch(loadingPickService,
|
||||
/TruckAppointmentService|completeLoadingFromPda|completeTruckAfterCommit/)
|
||||
})
|
||||
|
||||
test('PDA complete OpenAPI freezes reliable async acceptance and checkpoint recovery', () => {
|
||||
@@ -215,11 +217,12 @@ test('worker final Firstleg convergence is one short transaction after remote ow
|
||||
'settlementService.settleOwner(',
|
||||
'loadingDeliveryService.completeAfterPdaSettlement(',
|
||||
'completionTransaction.executeWithoutResult',
|
||||
'completeTruckAfterCommit(',
|
||||
])
|
||||
const finalizer = loadingPickService.slice(loadingPickService.indexOf('private void finalizeCompletion'),
|
||||
loadingPickService.indexOf('private void requireColoadConservation'))
|
||||
for (const token of ['COMPLETE_LOADING', 'finishFromPda', 'syncInboundProjections',
|
||||
'publishCompletedEvent', 'completeAccepted', 'completionCommands.complete']) assert.match(finalizer, new RegExp(token))
|
||||
assert.doesNotMatch(finalizer, /settlementService|completeTruckAfterCommit/)
|
||||
assert.doesNotMatch(finalizer, /settlementService/)
|
||||
assert.doesNotMatch(loadingPickService,
|
||||
/TruckAppointmentService|completeLoadingFromPda|completeTruckAfterCommit/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user