summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-extra-response.js
diff options
context:
space:
mode:
authorSantiago Gimeno <santiago.gimeno@gmail.com>2016-01-30 20:55:07 +0100
committerJames M Snell <jasnell@gmail.com>2016-02-01 08:45:55 -0800
commite4fc079080d52fe07d26511a696d452e28126dbb (patch)
tree9e76fe517f8f7ba6b904c62b8bee7420915b536a /test/parallel/test-http-extra-response.js
parent68a6abc806a0b359f72d73cfeb7ad7fd383f2c8b (diff)
downloadandroid-node-v8-e4fc079080d52fe07d26511a696d452e28126dbb.tar.gz
android-node-v8-e4fc079080d52fe07d26511a696d452e28126dbb.tar.bz2
android-node-v8-e4fc079080d52fe07d26511a696d452e28126dbb.zip
test: fix test-http-extra-response flakiness
It can happen that the extra response is to be sent in a different chunk from the rest of the data. At this moment, the client might have already closed the socket causing an `ECONNRESET` error. PR-URL: https://github.com/nodejs/node/pull/4979 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http-extra-response.js')
-rw-r--r--test/parallel/test-http-extra-response.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/parallel/test-http-extra-response.js b/test/parallel/test-http-extra-response.js
index bfd9b59462..fc398b9175 100644
--- a/test/parallel/test-http-extra-response.js
+++ b/test/parallel/test-http-extra-response.js
@@ -37,6 +37,10 @@ var server = net.createServer(function(socket) {
socket.end(fullResponse);
}
});
+
+ socket.on('error', function(err) {
+ assert.equal(err.code, 'ECONNRESET');
+ });
});