Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Fixes: #12903
  • Loading branch information
joyeecheung committed May 9, 2017
commit a1213a2a8eed3032f16d15a18b3e111255dcc35a
4 changes: 3 additions & 1 deletion benchmark/http/http_server_for_chunky_client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

var assert = require('assert');
var path = require('path');
var http = require('http');
var fs = require('fs');
Expand Down Expand Up @@ -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);
});