From a804026c9b5b9f8d6316fd5e9fdb9f96f7e1c6b3 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Wed, 3 Jun 2015 09:13:56 +0200 Subject: [PATCH] test: fix broken FreeBSD test Fixes net-server-max-connections-close-makes-more-available Handles connection 'error' event so the test ends. PR-URL: https://github.com/nodejs/io.js/pull/1881 Reviewed-By: Rich Trott Reviewed-By: Brendan Ashworth --- ...-net-server-max-connections-close-makes-more-available.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-net-server-max-connections-close-makes-more-available.js b/test/parallel/test-net-server-max-connections-close-makes-more-available.js index a482be7d02dec4..1569e859417f5a 100644 --- a/test/parallel/test-net-server-max-connections-close-makes-more-available.js +++ b/test/parallel/test-net-server-max-connections-close-makes-more-available.js @@ -28,6 +28,11 @@ var createConnection = function(index) { sent.push(msg); }); + connection.on('error', function(err) { + assert.equal(err.code, 'ECONNRESET'); + resolve(); + }); + connection.on('data', function(e) { console.error('connection ' + index + ' received response'); resolve();