diff --git a/test/matt.consumer.integration.spec.ts b/test/matt.consumer.integration.spec.ts index fa439829..0766d7fa 100644 --- a/test/matt.consumer.integration.spec.ts +++ b/test/matt.consumer.integration.spec.ts @@ -38,6 +38,7 @@ const sendMattMessageTCP = ( return new Promise((resolve) => { socket.on('data', (data) => { resolve(parseMattMessage(data.toString())); + socket.destroy(); }); }); }; diff --git a/test/matt.provider.integration.spec.ts b/test/matt.provider.integration.spec.ts index ad0097ed..5cb7969d 100644 --- a/test/matt.provider.integration.spec.ts +++ b/test/matt.provider.integration.spec.ts @@ -40,6 +40,7 @@ const startTCPServer = (host: string, port: number) => { sock.write(generateMattMessage('message not understood')); } sock.write('\n'); + sock.destroy(); }); });