fix(tests): use high non-privileged ports in tests to avoid conflicts and CI failures

This commit is contained in:
2026-02-21 13:27:55 +00:00
parent d4739045cd
commit 9368226ce0
9 changed files with 55 additions and 48 deletions

View File

@@ -21,8 +21,8 @@ tap.test('forward connections should not be immediately closed', async (t) => {
// Listen on a non-privileged port
await new Promise<void>((resolve) => {
testServer.listen(9090, '127.0.0.1', () => {
console.log('Test server listening on port 9090');
testServer.listen(47721, '127.0.0.1', () => {
console.log('Test server listening on port 47721');
resolve();
});
});
@@ -34,13 +34,13 @@ tap.test('forward connections should not be immediately closed', async (t) => {
{
name: 'forward-test',
match: {
ports: 8080,
ports: 47720,
},
action: {
type: 'forward',
targets: [{
host: '127.0.0.1',
port: 9090,
port: 47721,
}],
},
},
@@ -51,7 +51,7 @@ tap.test('forward connections should not be immediately closed', async (t) => {
// Create a client connection through the proxy
const client = net.createConnection({
port: 8080,
port: 47720,
host: '127.0.0.1',
});