diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml index ecf86e37d3..3010d00341 100644 --- a/.github/workflows/test-all-versions.yml +++ b/.github/workflows/test-all-versions.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - node: ["14", "16", "18", "20"] + node: ["14", "16", "18", "20", "22"] runs-on: ubuntu-latest services: mongo: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index e10f27b183..eb86cdbae3 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - node: ["14", "16", "18", "20"] + node: ["14", "16", "18", "20", "22"] include: - node: 18 code-coverage: true diff --git a/plugins/node/instrumentation-socket.io/test/socket.io.test.ts b/plugins/node/instrumentation-socket.io/test/socket.io.test.ts index 0b733a438c..83e13ab356 100644 --- a/plugins/node/instrumentation-socket.io/test/socket.io.test.ts +++ b/plugins/node/instrumentation-socket.io/test/socket.io.test.ts @@ -205,8 +205,6 @@ describe('SocketIoInstrumentation', () => { createServer((sio, port) => { const client = io(`http://localhost:${port}`); sio.on('connection', () => { - client.close(); - sio.close(); //trace is created after the listener method is completed setTimeout(() => { expectSpan('connection receive', span => { @@ -214,9 +212,11 @@ describe('SocketIoInstrumentation', () => { expect(span.attributes[SEMATTRS_MESSAGING_SYSTEM]).toEqual( 'socket.io' ); + client.close(); + sio.close(); done(); }); - }); + }, 10); }); }); }); @@ -417,9 +417,9 @@ describe('SocketIoInstrumentation', () => { }); sio.on('connection', (socket: Socket) => { socket.emit('test'); - client.close(); - sio.close(); setTimeout(() => { + client.close(); + sio.close(); expectSpan( `/[${socket.id}] send`, span => { @@ -435,7 +435,7 @@ describe('SocketIoInstrumentation', () => { }, 2 ); - }); + }, 10); }); }); });