From c0f8e49c324d37a50d97cd54c94358d385b76d52 Mon Sep 17 00:00:00 2001 From: Rich Trott 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 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann Reviewed-By: Richard Lau Reviewed-By: Trivikram Kamat Reviewed-By: Sakthipriyan Vairamani --- 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();