fix(typedsocket): initialize correlation ids for requests without pre-existing correlation metadata

This commit is contained in:
2026-05-08 10:17:19 +00:00
parent 56be583403
commit bf83f2d9be
5 changed files with 41 additions and 3 deletions
+14
View File
@@ -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');