This commit is contained in:
2025-05-24 00:23:35 +00:00
parent 0907949f8a
commit cb52446f65
76 changed files with 1401 additions and 867 deletions

View File

@ -5,6 +5,8 @@ import { startTestServer, stopTestServer } from '../../helpers/server.loader.js'
const TEST_PORT = 2525;
let testServer;
const createConnection = async (): Promise<net.Socket> => {
const socket = net.createConnection({
host: 'localhost',
@ -81,7 +83,7 @@ const testBasicSmtpFlow = async (socket: net.Socket): Promise<boolean> => {
};
tap.test('prepare server', async () => {
await startTestServer();
testServer = await startTestServer({ port: TEST_PORT });
await new Promise(resolve => setTimeout(resolve, 100));
});
@ -410,7 +412,7 @@ tap.test('REL-06: Network interruption - Long delay recovery', async (tools) =>
});
tap.test('cleanup server', async () => {
await stopTestServer();
await stopTestServer(testServer);
});
tap.start();