perf(cmpp): process inbound submits within client window

This commit is contained in:
hectorzhao
2026-08-20 11:45:16 +08:00
parent b9a71fe0b9
commit 0757a699ff
20 changed files with 389 additions and 47 deletions
@@ -81,6 +81,7 @@ function createPrismaMock() {
status: 'active',
interfaceEnabled: true,
cmppMaxConnections: 2,
cmppWindowSize: 32,
queuePriority: 'normal',
ipAllowlist: [{ ipCidr: '127.0.0.1/32' }],
tenant: { id: 'tenant-1', status: 'active', certificationStatus: 'approved' },
@@ -1057,6 +1058,7 @@ describe('SendChainService', () => {
account: '100001',
enterpriseCode: 'SP0001',
maxConnections: 2,
windowSize: 32,
status: 'authenticated',
}));
expect(prisma.operationLog.create).toHaveBeenCalledWith({
@@ -102,6 +102,7 @@ async authenticateInboundApplication(data: GatewayInboundAuthDto) {
enterpriseCode: application.cmppEnterpriseCode,
passwordCipher: application.secretHash,
maxConnections: application.cmppMaxConnections,
windowSize: application.cmppWindowSize,
status: 'authenticated',
};
} catch (error) {