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>
This commit is contained in:
parent
98609fc1c4
commit
3fa5d80eda
@ -1,5 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var assert = require('assert');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var http = require('http');
|
var http = require('http');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
@ -37,6 +38,7 @@ server.listen(PIPE);
|
|||||||
|
|
||||||
var child = fork(pep, process.argv.slice(2));
|
var child = fork(pep, process.argv.slice(2));
|
||||||
child.on('message', common.sendResult);
|
child.on('message', common.sendResult);
|
||||||
child.on('close', function() {
|
child.on('close', function(code) {
|
||||||
server.close();
|
server.close();
|
||||||
|
assert.strictEqual(code, 0);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user