mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
test: ignore tunnel resets in proxy invalid-char-in-url test
test-https-proxy-request-invalid-char-in-url is the only client-proxy test that asserts the proxy logged no socket errors at all. Once the last response has been read the client destroys its tunnel, and if the proxy is still relaying the upstream's TLS close_notify at that point the client answers with a reset, which the proxy records as ECONNRESET on the CONNECT socket. That has been failing the test on macOS even though every request was routed to the sanitized URL. Keep asserting on other errors but leave connection resets out. Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com> PR-URL: https://github.com/nodejs/node/pull/65780 Fixes: https://github.com/nodejs/node/issues/64226 Refs: https://github.com/nodejs/node/issues/59146 Refs: https://github.com/nodejs/node/issues/54534 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
1 parent
1957f9a282
commit
db0ca93e94
1 file changed
+3
-1
@@ -83,7 +83,9 @@ for (const testCase of testCases) {
|
||||
server.close();
|
||||
assert.deepStrictEqual(requests, expectedUrls);
|
||||
const requestLogs = logs.filter((log) => !('error' in log));
|
||||
const errors = logs.filter((log) => 'error' in log);
|
||||
// The client may reset a tunnel while the proxy is still relaying
|
||||
// the upstream's TLS shutdown; that says nothing about the URLs.
|
||||
const errors = logs.filter((log) => 'error' in log && log.error.code !== 'ECONNRESET');
|
||||
assert.deepStrictEqual(new Set(requestLogs), expectedProxyLogs);
|
||||
assert.deepStrictEqual(errors, []);
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user