From: Ryan Dahl Date: Fri, 21 Jan 2011 02:19:30 +0000 (-0800) Subject: test-http-client-reconnect-bug: hang up should be error. X-Git-Tag: v0.3.6~13^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a16e2a2a06ba88985ec62b78bd05f5257f882f3;p=platform%2Fupstream%2Fnodejs.git test-http-client-reconnect-bug: hang up should be error. --- diff --git a/test/pummel/test-http-client-reconnect-bug.js b/test/pummel/test-http-client-reconnect-bug.js index 3b102fc..b104f4d 100644 --- a/test/pummel/test-http-client-reconnect-bug.js +++ b/test/pummel/test-http-client-reconnect-bug.js @@ -11,11 +11,12 @@ var eofCount = 0; var server = net.createServer(function(socket) { socket.end(); }); + server.on('listening', function() { var client = http.createClient(common.PORT); client.addListener('error', function(err) { - console.log('ERROR! ' + (err.stack || err)); + console.log('ERROR! ' + err.message); errorCount++; }); @@ -30,6 +31,7 @@ server.on('listening', function() { console.log('STATUS: ' + response.statusCode); }); }); + server.listen(common.PORT); setTimeout(function() { @@ -38,6 +40,6 @@ setTimeout(function() { process.addListener('exit', function() { - assert.equal(0, errorCount); + assert.equal(1, errorCount); assert.equal(1, eofCount); });