Skip to content

Commit

Permalink
squash: refack nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Sep 29, 2017
1 parent 28ad47b commit 77ea4bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/sequential/test-http-server-consumed-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const server = http.createServer((req, res) => {

req.setTimeout(TIMEOUT, () => {
if (!intervalWasInvoked)
common.skip('interval was not invoked quickly enough for test');
return common.skip('interval was not invoked quickly enough for test');
common.fail('Request timeout should not fire');
});

Expand All @@ -35,8 +35,8 @@ server.listen(0, common.mustCall(() => {
// If machine is busy enough that the interval takes more than TIMEOUT ms
// to be invoked, skip the test.
const now = Date.now();
if (time < now - TIMEOUT)
common.skip('interval is not invoked quickly enough for test');
if (now - time > TIMEOUT)
return common.skip('interval is not invoked quickly enough for test');
time = now;
req.write('a');
}, common.platformTimeout(25));
Expand Down

0 comments on commit 77ea4bf

Please sign in to comment.