Last active
March 4, 2016 02:33
-
-
Save MylesBorins/6615a27684deb682dfe7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const common = require('../common'); | |
const assert = require('assert'); | |
const http = require('http'); | |
process.on('uncaughtException', function(error) { | |
assert.ok(error); | |
server.close(); | |
}); | |
const server = http.createServer(function(req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}) | |
res.end('some data') | |
}); | |
server.listen(8183, function () { | |
http.get('http://localhost:8183', function (res) { | |
assert.ok(res); | |
res.resume(); | |
throw new Error("some error"); | |
}); | |
}); | |
setTimeout(function() { | |
common.fail('the process should throw and not timeout'); | |
server.close(); | |
}, common.platformTimeout(1000)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this test works on v5.7.0, broken on v5.7.1
Caused by --> nodejs/node#5419
More info on make callback --> nodejs/node#4507