Skip to content

Commit

Permalink
test: remove setImmediate from timeout test
Browse files Browse the repository at this point in the history
In test-http2-session-timeout, setImmediate() is used to wrap makeReq().
makeReq() is asynchronous and setImmediate() is not necessary.

PR-URL: nodejs#23058
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
Trott committed Sep 27, 2018
1 parent a00eee3 commit ab73265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/sequential/test-http2-session-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ server.listen(0, common.mustCall(() => {
const diff = process.hrtime(startTime);
const milliseconds = (diff[0] * 1e3 + diff[1] / 1e6);
if (milliseconds < serverTimeout * 2) {
setImmediate(makeReq);
makeReq();
} else {
server.removeListener('timeout', mustNotCall);
server.close();
Expand Down

0 comments on commit ab73265

Please sign in to comment.