test: fix flaky test-http2-reset-flood

Set `allowHalfOpen: true` in the client.

Fixes: https://github.com/nodejs/node/issues/29802
Refs: https://github.com/nodejs/node/pull/31806

PR-URL: https://github.com/nodejs/node/pull/34318
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
This commit is contained in:
Rich Trott 2020-07-11 18:12:18 -07:00 committed by Anna Henningsen
parent a038199265
commit 4195c31ecb
No known key found for this signature in database
GPG Key ID: A94130F0BFC8EBE9
2 changed files with 1 additions and 5 deletions

View File

@ -5,8 +5,6 @@ prefix parallel
# sample-test : PASS,FLAKY
[true] # This section applies to all platforms
# https://github.com/nodejs/node/issues/29802
test-http2-reset-flood: PASS,FLAKY
[$system==win32]
# https://github.com/nodejs/node/issues/32863
@ -46,8 +44,6 @@ test-crypto-keygen: SKIP
[$system==freebsd]
# https://github.com/nodejs/node/issues/31727
test-fs-stat-bigint: PASS,FLAKY
# https://github.com/nodejs/node/issues/29802
test-http2-reset-flood: PASS,FLAKY
# https://github.com/nodejs/node/issues/28803
test-stdout-close-catch: PASS,FLAKY
# https://github.com/nodejs/node/issues/31280

View File

@ -28,7 +28,7 @@ if (process.env.HAS_STARTED_WORKER) {
process.env.HAS_STARTED_WORKER = 1;
const worker = new Worker(__filename).on('message', common.mustCall((port) => {
const h2header = Buffer.alloc(9);
const conn = net.connect(port);
const conn = net.connect({ port, allowHalfOpen: true });
conn.write('PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n');