diff --git a/test/client-proxy/test-https-proxy-request-invalid-char-in-url.mjs b/test/client-proxy/test-https-proxy-request-invalid-char-in-url.mjs index 888137b9a5a..6f27f0775ae 100644 --- a/test/client-proxy/test-https-proxy-request-invalid-char-in-url.mjs +++ b/test/client-proxy/test-https-proxy-request-invalid-char-in-url.mjs @@ -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, []); }));