fix(typedsocket): initialize correlation ids for requests without pre-existing correlation metadata
This commit is contained in:
@@ -89,6 +89,20 @@ tap.test('should process messages from client to server', async () => {
|
||||
expect(response.answer).toContain('ok, got it');
|
||||
});
|
||||
|
||||
tap.test('should process stream control messages without pre-existing correlation', async () => {
|
||||
const response = await (testTypedSocketClient as any).sendRequest({
|
||||
method: '##VirtualStream##',
|
||||
request: {
|
||||
streamId: 'unknown-stream',
|
||||
cycleId: 'unknown-cycle',
|
||||
cycle: 'request',
|
||||
mainPurpose: 'feedback',
|
||||
},
|
||||
response: null,
|
||||
});
|
||||
expect(response.correlation.id).toBeTruthy();
|
||||
});
|
||||
|
||||
tap.test('should find connections by tag', async () => {
|
||||
console.log('Finding connections by tag...');
|
||||
const connections = await testTypedSocketServer.findAllTargetConnectionsByTag('testTag');
|
||||
|
||||
Reference in New Issue
Block a user