Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
squash: change assert logic
  • Loading branch information
daxlab committed Nov 26, 2017
commit f687f362e5aef3f1eb5aa2ce9ec1fa4670324b7d
3 changes: 1 addition & 2 deletions test/parallel/test-http-parser-free.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const assert = require('assert');
const http = require('http');
const Countdown = require('../common/countdown');
const N = 100;
const responses = 0;

const server = http.createServer(function(req, res) {
res.end('Hello');
Expand Down Expand Up @@ -53,5 +52,5 @@ server.listen(0, function() {
});

process.on('exit', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this check? Doesn't server.close() / end of execution from the Countdown mean we've already hit zero remaining?

cc @jasnell

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, the process.on('exit') can be removed.

assert.strictEqual(responses, N);
assert.strictEqual(0, countdown.remaining);
});