-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: rename regression tests more expressively
PR-URL: #19495 Refs: #19105 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
Showing
6 changed files
with
90 additions
and
59 deletions.
There are no files selected for viewing
5 changes: 4 additions & 1 deletion
5
...arallel/test-arm-math-exp-regress-1376.js → ...llel/test-arm-math-illegal-instruction.js
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
7 changes: 5 additions & 2 deletions
7
test/parallel/test-buffer-regression-649.js → ...rallel/test-buffer-tostring-rangeerror.js
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
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 was deleted.
Oops, something went wrong.
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,56 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const Countdown = require('../common/countdown'); | ||
|
||
// This test ensures that the `maxSockets` value for `http.Agent` is respected. | ||
// https://github.com/nodejs/node/issues/4050 | ||
|
||
const assert = require('assert'); | ||
const http = require('http'); | ||
|
||
const MAX_SOCKETS = 2; | ||
|
||
const agent = new http.Agent({ | ||
keepAlive: true, | ||
keepAliveMsecs: 1000, | ||
maxSockets: MAX_SOCKETS, | ||
maxFreeSockets: 2 | ||
}); | ||
|
||
const server = http.createServer( | ||
common.mustCall((req, res) => { | ||
res.end('hello world'); | ||
}, 6) | ||
); | ||
|
||
const countdown = new Countdown(6, () => server.close()); | ||
|
||
function get(path, callback) { | ||
return http.get( | ||
{ | ||
host: 'localhost', | ||
port: server.address().port, | ||
agent: agent, | ||
path: path | ||
}, | ||
callback | ||
); | ||
} | ||
|
||
server.listen( | ||
0, | ||
common.mustCall(() => { | ||
for (let i = 0; i < 6; i++) { | ||
const request = get('/1', common.mustCall()); | ||
request.on( | ||
'response', | ||
common.mustCall(() => { | ||
request.abort(); | ||
const sockets = agent.sockets[Object.keys(agent.sockets)[0]]; | ||
assert(sockets.length <= MAX_SOCKETS); | ||
countdown.dec(); | ||
}) | ||
); | ||
} | ||
}) | ||
); |