From c0f8e49c324d37a50d97cd54c94358d385b76d52 Mon Sep 17 00:00:00 2001 From: Rich Trott <rtrott@gmail.com> Date: Mon, 24 Sep 2018 05:54:57 -0700 Subject: [PATCH] test: remove setImmediate from timeout test In test-http2-session-timeout, setImmediate() is used to wrap makeReq(). makeReq() is asynchronous and setImmediate() is not necessary. Backport-PR-URL: https://github.com/nodejs/node/pull/22850 PR-URL: https://github.com/nodejs/node/pull/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> --- test/sequential/test-http2-session-timeout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequential/test-http2-session-timeout.js b/test/sequential/test-http2-session-timeout.js index 5c4f047b338e9c..9f0c8cd4d003c8 100644 --- a/test/sequential/test-http2-session-timeout.js +++ b/test/sequential/test-http2-session-timeout.js @@ -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();