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 <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 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.