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 <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • 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.