fix: coordinate SMS completion and improve operations diagnostics
CSS quality / css-quality (push) Has been cancelled
CSS quality / css-quality (push) Has been cancelled
This commit is contained in:
@@ -1694,6 +1694,7 @@ describe('SendChainService', () => {
|
||||
applicationId: 'app-1',
|
||||
eventType: 'receipt',
|
||||
}),
|
||||
undefined,
|
||||
);
|
||||
expect(prisma.cmppDownstreamDelivery.create).not.toHaveBeenCalled();
|
||||
});
|
||||
@@ -3257,7 +3258,7 @@ describe('SendChainService', () => {
|
||||
data: expect.objectContaining({ sequenceId: 7, gatewayMessageId: 'GW-1', submitStatus: 'accepted' }),
|
||||
});
|
||||
expect(prisma.smsMessageRecord.updateMany).toHaveBeenCalledWith({
|
||||
where: { id: 'record-1', status: { notIn: ['delivered', 'failed', 'unknown'] } },
|
||||
where: { id: 'record-1', status: { notIn: ['delivered', 'failed', 'unknown', 'timeout'] } },
|
||||
data: expect.objectContaining({ gatewayMessageId: 'GW-1', status: 'submitted', submitStatus: 'accepted' }),
|
||||
});
|
||||
expect(billing.settleFrozenCharge).toHaveBeenCalledWith(
|
||||
@@ -4891,7 +4892,7 @@ describe('SendChainService', () => {
|
||||
expect(prisma.smsMessageRecord.updateMany).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
expect.objectContaining({
|
||||
where: { id: 'record-1', status: { notIn: ['delivered', 'failed', 'unknown'] } },
|
||||
where: { id: 'record-1', status: { notIn: ['delivered', 'failed', 'unknown', 'timeout'] } },
|
||||
data: expect.objectContaining({ status: 'submitted' }),
|
||||
}),
|
||||
);
|
||||
@@ -5567,6 +5568,7 @@ describe('SendChainService', () => {
|
||||
errorCode: 'RECEIPT_TIMEOUT',
|
||||
}),
|
||||
}),
|
||||
undefined,
|
||||
);
|
||||
expect(prisma.cmppDownstreamDelivery.create).not.toHaveBeenCalled();
|
||||
expect(prisma.smsMessageRecord.updateMany).toHaveBeenCalledWith({
|
||||
|
||||
Reference in New Issue
Block a user