test: fix test-http2-socket-close.js

Fixes: https://github.com/nodejs/node/issues/54819
PR-URL: https://github.com/nodejs/node/pull/54900
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
Hüseyin Açacak 2024-09-14 19:01:56 +03:00 committed by GitHub
parent efbba60e5b
commit c6f514c7ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,6 @@ test-runner-watch-mode-complex: PASS, FLAKY
test-async-context-frame: PASS, FLAKY
# https://github.com/nodejs/node/issues/54534
test-runner-run-watch: PASS, FLAKY
# https://github.com/nodejs/node/issues/54819
test-http2-socket-close: PASS, FLAKY
# Windows on ARM
[$system==win32 && $arch==arm64]

View File

@ -42,6 +42,7 @@ netServer.listen(0, common.mustCall(() => {
rejectUnauthorized: false
});
proxyClient.on('error', () => {});
proxyClient.on('close', common.mustCall(() => {
netServer.close();
}));
@ -51,6 +52,7 @@ netServer.listen(0, common.mustCall(() => {
':path': '/'
});
req.on('error', () => {});
req.on('response', common.mustCall((response) => {
assert.strictEqual(response[':status'], 200);