You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
654 B

'use strict';
require('../common');
const http = require('http');
const server = http.createServer(function(req, res) {
intentionally_not_defined(); // eslint-disable-line no-undef
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('Thank you, come again.');
res.end();
});
server.listen(0, function() {
for (let i = 0; i < 4; i += 1) {
http.get({ port: this.address().port, path: '/busy/' + i });
}
});
let exception_count = 0;
process.on('uncaughtException', function(err) {
console.log('Caught an exception: ' + err);
if (err.name === 'AssertionError') throw err;
if (++exception_count === 4) process.exit(0);
});