From 80209cc4c991d4392f776a887c06f84c1319923b Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 4 Mar 2019 12:16:07 -0500 Subject: [PATCH] test: relax timer check in test-report-uv-handles.js The underlying JavaScript runtime may schedule tasks at its discretion so there may be more timer handles than the one created by the test. PR-URL: https://github.com/nodejs/node/pull/26434 Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Gireesh Punathil --- test/report/test-report-uv-handles.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/report/test-report-uv-handles.js b/test/report/test-report-uv-handles.js index 6473b630f5747a..65468bb48d1955 100644 --- a/test/report/test-report-uv-handles.js +++ b/test/report/test-report-uv-handles.js @@ -133,7 +133,7 @@ if (process.argv[2] === 'child') { } assert(handle.is_referenced); }, 3), - timer: common.mustCall(function timer_validator(handle) { + timer: common.mustCallAtLeast(function timer_validator(handle) { assert(!handle.is_referenced); assert.strictEqual(handle.repeat, 0); }), @@ -143,6 +143,7 @@ if (process.argv[2] === 'child') { assert(handle.is_referenced); }), }; + console.log(report.libuv); for (const entry of report.libuv) { if (validators[entry.type]) validators[entry.type](entry); }