test: reduce the number of requests and parsers

The maximum number of parsers in the free list is set to 1000. However
the test does not need to use this maximum. Reduce it to 50.

Refs: https://github.com/nodejs/node/pull/50228#issuecomment-1768293624
PR-URL: https://github.com/nodejs/node/pull/50240
Fixes: https://github.com/nodejs/node/issues/49564
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
This commit is contained in:
Luigi Pinca
2023-10-20 14:56:44 +02:00
committed by GitHub
parent 8f3146ea62
commit 0345ea5928

View File

@@ -8,6 +8,8 @@ const httpCommon = require('_http_common');
const { HTTPParser } = require('_http_common');
const net = require('net');
httpCommon.parsers.max = 50;
const COUNT = httpCommon.parsers.max + 1;
const parsers = new Array(COUNT);