mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60759 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
57 files changed
+246
-286
No files matched your search
@@ -46,25 +46,23 @@ const N = 4;
|
||||
const M = 4;
|
||||
|
||||
|
||||
server.listen(0, () => {
|
||||
server.listen(0, common.mustCall(() => {
|
||||
for (let i = 0; i < N; i++) {
|
||||
setTimeout(() => {
|
||||
setTimeout(common.mustCall(() => {
|
||||
for (let j = 0; j < M; j++) {
|
||||
https.get({
|
||||
path: '/',
|
||||
port: server.address().port,
|
||||
rejectUnauthorized: false
|
||||
}, function(res) {
|
||||
}, common.mustCall((res) => {
|
||||
res.resume();
|
||||
assert.strictEqual(res.statusCode, 200);
|
||||
if (++responses === N * M) server.close();
|
||||
}).on('error', (e) => {
|
||||
throw e;
|
||||
});
|
||||
})).on('error', common.mustNotCall());
|
||||
}
|
||||
}, i);
|
||||
}), i);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
||||
process.on('exit', () => {
|
||||
|
||||
Reference in new issue
Block a user