fix(tests): fix tests
This commit is contained in:
@ -8,16 +8,18 @@ tap.test('memory leak fixes verification', async () => {
|
||||
const proxy = new SmartProxy({
|
||||
ports: [8081],
|
||||
routes: [
|
||||
createHttpRoute('test.local', { host: 'localhost', port: 3200 }),
|
||||
createHttpRoute('test.local', { host: 'localhost', port: 3200 }, {
|
||||
match: {
|
||||
ports: 8081,
|
||||
domains: 'test.local'
|
||||
}
|
||||
}),
|
||||
]
|
||||
});
|
||||
|
||||
// Override route port
|
||||
proxy.settings.routes[0].match.ports = 8081;
|
||||
|
||||
await proxy.start();
|
||||
|
||||
const metricsCollector = (proxy.getStats() as any);
|
||||
const metricsCollector = (proxy as any).metricsCollector;
|
||||
|
||||
// Check initial state
|
||||
console.log('Initial timestamps:', metricsCollector.requestTimestamps.length);
|
||||
|
Reference in New Issue
Block a user