feat: complete cmpp gateway delivery recovery workflows
This commit is contained in:
@@ -155,6 +155,8 @@ describe('ChannelsService', () => {
|
||||
account: 'sp',
|
||||
passwordCipher: 'secret',
|
||||
srcId: '10690000',
|
||||
desiredConnections: 2,
|
||||
windowSize: 32,
|
||||
});
|
||||
await service.createGroup({ code: 'G-MOBILE', name: '移动组', carrier: 'mobile', retryEnabled: true, retryTimeLimitMinutes: 750 });
|
||||
await service.createRouteRule({ tenantId: 'tenant-1', applicationId: 'app-1', groupId: 'group-1', carrier: 'mobile' });
|
||||
@@ -166,6 +168,7 @@ describe('ChannelsService', () => {
|
||||
rateLimitPerSecond: 100,
|
||||
sendRegion: '全国',
|
||||
status: 'active',
|
||||
config: expect.objectContaining({ desiredConnections: 2, windowSize: 32 }),
|
||||
}),
|
||||
});
|
||||
expect(prisma.cmppConnectionState.create).toHaveBeenCalledWith({
|
||||
@@ -173,7 +176,7 @@ describe('ChannelsService', () => {
|
||||
channelId: 'channel-1',
|
||||
connectionId: 'channel-1:primary',
|
||||
status: 'connecting',
|
||||
desiredConnections: 1,
|
||||
desiredConnections: 2,
|
||||
currentConnections: 0,
|
||||
}),
|
||||
});
|
||||
@@ -215,6 +218,8 @@ describe('ChannelsService', () => {
|
||||
sendRegion: '全国',
|
||||
account: 'sp-new',
|
||||
srcId: '10690001',
|
||||
desiredConnections: 3,
|
||||
windowSize: 64,
|
||||
unitPrice: 4,
|
||||
})).resolves.toEqual(expect.objectContaining({
|
||||
id: 'channel-1',
|
||||
@@ -230,6 +235,7 @@ describe('ChannelsService', () => {
|
||||
gatewayPort: 27890,
|
||||
carrier: 'all',
|
||||
passwordCipher: undefined,
|
||||
config: expect.objectContaining({ desiredConnections: 3, windowSize: 64 }),
|
||||
}),
|
||||
});
|
||||
expect(prisma.operationLog.create).toHaveBeenCalledWith({
|
||||
|
||||
Reference in New Issue
Block a user