summaryrefslogtreecommitdiff
path: root/benchmark/http
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2017-05-09 17:06:07 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2017-05-13 23:30:29 +0800
commit3fa5d80edae000eb280aa9c715ac9245e3b98e06 (patch)
tree60ebb0505618b8afdf896df44a7eebb31ffc5dc3 /benchmark/http
parent98609fc1c4635f02f8f6ef9dd079207a1204b9a1 (diff)
downloadandroid-node-v8-3fa5d80edae000eb280aa9c715ac9245e3b98e06.tar.gz
android-node-v8-3fa5d80edae000eb280aa9c715ac9245e3b98e06.tar.bz2
android-node-v8-3fa5d80edae000eb280aa9c715ac9245e3b98e06.zip
benchmark: chunky http client should exit with 0
Previously when there is an error in the chunky client of the http benchmark, the server would not check the exit code and thus produce invalid results. PR-URL: https://github.com/nodejs/node/pull/12916 Fixes: https://github.com/nodejs/node/issues/12903 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/http')
-rw-r--r--benchmark/http/http_server_for_chunky_client.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/benchmark/http/http_server_for_chunky_client.js b/benchmark/http/http_server_for_chunky_client.js
index 3b0ec21cbe..04d5a2c4a0 100644
--- a/benchmark/http/http_server_for_chunky_client.js
+++ b/benchmark/http/http_server_for_chunky_client.js
@@ -1,5 +1,6 @@
'use strict';
+var assert = require('assert');
var path = require('path');
var http = require('http');
var fs = require('fs');
@@ -37,6 +38,7 @@ server.listen(PIPE);
var child = fork(pep, process.argv.slice(2));
child.on('message', common.sendResult);
-child.on('close', function() {
+child.on('close', function(code) {
server.close();
+ assert.strictEqual(code, 0);
});