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.

Backport-PR-URL: #22850
PR-URL: #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 authored and BethGriggs committed Oct 16, 2018
1 parent 10576d6 commit c0f8e49
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 c0f8e49

Please sign in to comment.