Skip to content

Commit

Permalink
test: relax timer check in test-report-uv-handles.js
Browse files Browse the repository at this point in the history
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: #26434
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
richardlau authored and BridgeAR committed Mar 14, 2019
1 parent ca2328d commit a67fea5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/report/test-report-uv-handles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}),
Expand All @@ -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);
}
Expand Down

0 comments on commit a67fea5

Please sign in to comment.