Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions test/e2e/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,6 @@ const createTestSuite = ({
upstreamProxyPort = takePort(freePorts);
upstreamProxyServer = createProxy(upstreamProxyHttpServer);
listenOnPort(upstreamProxyServer, upstreamProxyPort).then(() => resolve(), reject);

// This is a workaround to a buggy implementation of "proxy" package. On Node 10+,
// the socket sometimes emits ECONNRESET error, which would break the test.
// We just swallow it.
upstreamProxyServer.on('connect', (_req: http.IncomingMessage, socket: net.Socket) => {
socket.on('error', (err: NodeJS.ErrnoException) => {
if (err.code === 'ECONNRESET') return;
throw err;
});
});
});
}
}).then(async () => {
Expand Down
Loading