update
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import * as plugins from '@git.zone/tstest/tapbundle';
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as net from 'net';
|
||||
import { startTestServer, stopTestServer } from '../server.loader.js';
|
||||
import { startTestServer, stopTestServer } from '../../helpers/server.loader.js';
|
||||
|
||||
const TEST_PORT = 2525;
|
||||
|
||||
@ -120,7 +120,7 @@ tap.test('ERR-05: Resource exhaustion handling - Connection limit', async (tools
|
||||
console.log(`Exhaustion detected: ${exhaustionDetected}`);
|
||||
if (lastError) console.log(`Last error: ${lastError}`);
|
||||
|
||||
expect(hasResourceProtection).toBeTrue();
|
||||
expect(hasResourceProtection).toEqual(true);
|
||||
done.resolve();
|
||||
} catch (error) {
|
||||
console.error('Test error:', error);
|
||||
@ -236,12 +236,12 @@ tap.test('ERR-05: Resource exhaustion handling - Memory limits', async (tools) =
|
||||
}
|
||||
|
||||
// Resource protection is working if we got an error or protective response
|
||||
expect(resourceError || endResponse.includes('552') || endResponse.includes('451')).toBeTrue();
|
||||
expect(resourceError || endResponse.includes('552') || endResponse.includes('451')).toEqual(true);
|
||||
|
||||
} catch (err) {
|
||||
// Errors during large data transmission indicate resource protection
|
||||
console.log('Expected resource protection error:', err);
|
||||
expect(true).toBeTrue();
|
||||
expect(true).toEqual(true);
|
||||
}
|
||||
|
||||
socket.write('QUIT\r\n');
|
||||
|
Reference in New Issue
Block a user