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
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,19 @@ for (const testCase of testCases) {
proxy.close();
server.close();
assert.deepStrictEqual(requests, expectedUrls);
assert.deepStrictEqual(new Set(logs), expectedProxyLogs);
const logSet = new Set(logs);
for (const log of logSet) {
if (log.source === 'proxy connect' && log.error?.code === 'EPIPE') {
// There can be a race from eagerly shutting down the servers and severing
// two pipes at the same time but for the purpose of this test, we only
// care about whether the requests are initiated from the client as expected,
// not how the upstream/proxy servers behave. Ignore EPIPE errors from them..
// Refs: https://github.com/nodejs/node/issues/59741
console.log('Ignoring EPIPE error from proxy connect', log.error);
logSet.delete(log);
}
}
assert.deepStrictEqual(logSet, expectedProxyLogs);
}));
}
}));
Expand Down
Loading