-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inspector: Use default uv_listen backlog size
PR-URL: #20254 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
- Loading branch information
1 parent
b5c1c14
commit 375994f
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Flags: --expose-internals | ||
'use strict'; | ||
const common = require('../common'); | ||
|
||
common.skipIfInspectorDisabled(); | ||
|
||
const assert = require('assert'); | ||
const { NodeInstance } = require('../common/inspector-helper.js'); | ||
|
||
async function testHttp(child, number) { | ||
try { | ||
await child.httpGet(null, '/json/list'); | ||
return true; | ||
} catch (e) { | ||
console.error(`Attempt ${number} failed`, e); | ||
return false; | ||
} | ||
} | ||
|
||
async function runTest() { | ||
const child = new NodeInstance(undefined, ''); | ||
|
||
const promises = []; | ||
for (let i = 0; i < 100; i++) { | ||
promises.push(testHttp(child, i)); | ||
} | ||
const result = await Promise.all(promises); | ||
assert(!result.some((a) => !a), 'Some attempts failed'); | ||
return child.kill(); | ||
} | ||
|
||
common.crashOnUnhandledRejection(); | ||
|
||
runTest(); |