This commit is contained in:
2025-05-23 19:49:25 +00:00
parent e0f6e3237b
commit a7438a7cd6
40 changed files with 189 additions and 178 deletions

View File

@ -2,15 +2,12 @@ import { tap, expect } from '@git.zone/tstest/tapbundle';
import { startTestServer, stopTestServer, type ITestServer } from './helpers/server.loader.js';
import * as plugins from '../ts/plugins.js';
let testServer: ITestServer;
let testServer: SmtpServer;
tap.test('setup - start SMTP server with short timeout', async () => {
testServer = await startTestServer({
port: 2533,
hostname: 'localhost',
timeout: 5000 // 5 second timeout for testing
});
expect(testServer).toBeInstanceOf(Object);
testServer = await startTestServer();
await new Promise(resolve => setTimeout(resolve, 1000));
});
tap.test('CM-03: Connection Timeout - idle connections are closed after timeout', async (tools) => {
@ -127,7 +124,7 @@ tap.test('CM-03: Active connection should not timeout', async () => {
});
tap.test('cleanup - stop SMTP server', async () => {
await stopTestServer(testServer);
await stopTestServer();
});
tap.start();