-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
test: refactor code in test-cluster-http-pipe #10297
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
})); | ||
worker.on('exit', function() { | ||
worker.on('exit', common.mustCall(() => { | ||
process.exit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling process.exit();
is not necessary
res.resume(); | ||
res.on('end', function(err) { | ||
if (err) throw err; | ||
assert.ifError(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would wrap the callback with common.mustCall()
* use common.mustCall to control the functions execution automatically * use const instead of var * use assert.strictEqual instead assert.equal * use assert.ifError instead of throw error
80301a5
to
91782d7
Compare
@santigimeno implemented your suggestions here, @italoacasas please set another CI task I guess? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a new CI run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* use common.mustCall to control the functions execution automatically * use const instead of var * use assert.strictEqual instead assert.equal * use assert.ifError instead of throw error PR-URL: #10297 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 9073fda |
* use common.mustCall to control the functions execution automatically * use const instead of var * use assert.strictEqual instead assert.equal * use assert.ifError instead of throw error PR-URL: #10297 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* use common.mustCall to control the functions execution automatically * use const instead of var * use assert.strictEqual instead assert.equal * use assert.ifError instead of throw error PR-URL: #10297 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* use common.mustCall to control the functions execution automatically * use const instead of var * use assert.strictEqual instead assert.equal * use assert.ifError instead of throw error PR-URL: #10297 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* use common.mustCall to control the functions execution automatically * use const instead of var * use assert.strictEqual instead assert.equal * use assert.ifError instead of throw error PR-URL: #10297 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* use common.mustCall to control the functions execution automatically * use const instead of var * use assert.strictEqual instead assert.equal * use assert.ifError instead of throw error PR-URL: #10297 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change