timers: emit process warning if delay is negative or NaN#46678
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
bf96237 to
0f7f6f1
Compare
0f7f6f1 to
e788632
Compare
|
I personally would prefer to add |
debadree25
left a comment
There was a problem hiding this comment.
Hi I think this would require a test too that the warning is emitted as per the conditions
Hi Debadree, I was wondering if we should add a new warning name(s) to address negative number and |
Didn't get you here 😅 new name for the warning? |
Sorry, I was trying to refer to here, when the delay is greater than |
|
Ah, I think having a name would be a good thing, would follow the pattern and make it easier to test maybe something like |
|
Sorry, I didn't know that when you request a new review would remove the existing review request 😅 |
81c846e to
8da4a3b
Compare
|
I forgot to rebase @debadree25 sorry, would you mind running the workflows again 🙏 |
debadree25
left a comment
There was a problem hiding this comment.
The code looks good! will wait for a few more reviews!
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Yup. |
Commit Queue failed- Loading data for nodejs/node/pull/46678 ✔ Done loading data for nodejs/node/pull/46678 ----------------------------------- PR info ------------------------------------ Title timers: emit process warning if delay is negative or NaN (#46678) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch jakecastelli:improve-timer-warning-message -> nodejs:main Labels timers, semver-major, author ready, needs-ci, review wanted Commits 3 - timers: emit warning if delay is negative or NaN - fixup! - fixup! lint Committers 1 - jakecastelli <959672929@qq.com> PR-URL: https://github.com/nodejs/node/pull/46678 Reviewed-By: Debadree Chatterjee Reviewed-By: Ulises Gascón Reviewed-By: Benjamin Gruenbaum Reviewed-By: Chengzhong Wu ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/46678 Reviewed-By: Debadree Chatterjee Reviewed-By: Ulises Gascón Reviewed-By: Benjamin Gruenbaum Reviewed-By: Chengzhong Wu -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 16 Feb 2023 01:34:23 GMT ✔ Approvals: 4 ✔ - Debadree Chatterjee (@debadree25): https://github.com/nodejs/node/pull/46678#pullrequestreview-1304735554 ✔ - Ulises Gascón (@UlisesGascon): https://github.com/nodejs/node/pull/46678#pullrequestreview-1314970311 ✔ - Benjamin Gruenbaum (@benjamingr) (TSC): https://github.com/nodejs/node/pull/46678#pullrequestreview-2145179529 ✔ - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/46678#pullrequestreview-2145602094 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2024-06-27T16:48:46Z: https://ci.nodejs.org/job/node-test-pull-request/59989/ - Querying data for job/node-test-pull-request/59989/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 46678 From https://github.com/nodejs/node * branch refs/pull/46678/merge -> FETCH_HEAD ✔ Fetched commits as 764b13d75c0a..970b44b07bef -------------------------------------------------------------------------------- [main 82ecda2b49] timers: emit warning if delay is negative or NaN Author: jakecastelli <959672929@qq.com> Date: Thu Feb 16 11:59:33 2023 +1030 9 files changed, 272 insertions(+), 5 deletions(-) create mode 100644 test/parallel/test-timers-nan-duration-emit-once-per-process.js create mode 100644 test/parallel/test-timers-nan-duration-warning.js create mode 100644 test/parallel/test-timers-negative-duration-warning-emit-once-per-process.js create mode 100644 test/parallel/test-timers-negative-duration-warning.js create mode 100644 test/parallel/test-timers-not-emit-duration-zero.js [main 99160b3ff3] fixup! Author: jakecastelli <959672929@qq.com> Date: Wed Jun 26 11:52:18 2024 +0930 1 file changed, 1 insertion(+), 1 deletion(-) [main e3f8f61393] fixup! lint Author: jakecastelli <959672929@qq.com> Date: Wed Jun 26 14:58:22 2024 +0930 1 file changed, 1 insertion(+), 1 deletion(-) ✔ Patches applied There are 3 commits in the PR. Attempting autorebase. Rebasing (2/6)https://github.com/nodejs/node/actions/runs/9712029958 |
|
Landed in f5ed338 |
Partially addressed #46596 to keep the consistency of the warning message for
TIMEOUT_MAXnumber as the negative number,NaNwill be set to1as well.