FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: remove interval and give more time to unsync by pmarchini · Pull Request #55006 · nodejs/node · GitHub

/ node Public

test: remove interval and give more time to unsync - #55006

Merged
nodejs-github-bot merged 4 commits into
nodejs:mainfrom
pmarchini:issue/54807
Sep 24, 2024
Merged

test: remove interval and give more time to unsync#55006
nodejs-github-bot merged 4 commits into
nodejs:mainfrom
pmarchini:issue/54807

Conversation

Copy link
Copy Markdown
Member

This PR should address #54807.

I'm leaving this in Draft while testing more extensively 🚀

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Sep 19, 2024
pmarchini marked this pull request as ready for review September 19, 2024 10:25
avivkeller added the test_runner Issues and PRs related to the test runner subsystem. label Sep 19, 2024
Comment on lines +79 to +82
await new Promise((resolve) => setTimeout(() => {
unlinkSync(fileToDeletePathLocal);
resolve();
}, common.platformTimeout(1000)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can/Should this be simplified with node:timers/promises?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I didn't think about it, thanks for the suggestion, I'll take a look 😁

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Would using node:fs/promises be enough here? It seems weird to have to put a sync operation in an async one

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Hey @aduh95, yes, no problem at all.
The only important logic is the "sleep" after the delete to ensure that the watcher has received the event and completed the test run before proceeding.
Thanks for your feedback, I'll fixit ASAP 😁

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

just update 😁

codecov Bot commented Sep 19, 2024
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.25%. Comparing base (0d4387e) to head (e654e80).
Report is 483 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55006      +/-   ##
==========================================
+ Coverage   88.04%   88.25%   +0.20%     
==========================================
  Files         652      651       -1     
  Lines      183765   183877     +112     
  Branches    35863    35857       -6     
==========================================
+ Hits       161789   162273     +484     
+ Misses      15229    14898     -331     
+ Partials     6747     6706      -41     

see 108 files with indirect coverage changes

jasnell added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024

Copy link
Copy Markdown
Collaborator

cjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM with some minor comments.

If this fixes #54807, can you add that to this PR so that the issue gets closed.

Comment on lines +18 to +20
function wait(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You can use setTimeout() from node:timers/promises for this exact functionality.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

done 😁

cjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, thanks!

cjihrig added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 21, 2024

This comment was marked as outdated.

Copy link
Copy Markdown
Member

I see this test fail a lot on windows platform, could we queue a stress test?

aduh95 commented Sep 23, 2024
edited by cjihrig
Loading

Copy link
Copy Markdown
Contributor

Stress test CI: https://ci.nodejs.org/view/Stress/job/node-stress-single-test/538/ 🟢

This comment was marked as outdated.

This comment was marked as outdated.

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You might want to use the flush option of writeFile to cause an fsync: https://nodejs.org/docs/latest/api/fs.html#fspromiseswritefilefile-data-options.

mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 24, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 24, 2024

Copy link
Copy Markdown
Collaborator

nodejs-github-bot commented Sep 24, 2024
edited by jakecastelli
Loading

Copy link
Copy Markdown
Collaborator

cjihrig added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed needs-ci PRs that need a full CI run. labels Sep 24, 2024
cjihrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 24, 2024
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 24, 2024
nodejs-github-bot merged commit 02e8972 into nodejs:main Sep 24, 2024

Copy link
Copy Markdown
Collaborator

Landed in 02e8972

targos pushed a commit that referenced this pull request Oct 4, 2024
PR-URL: #55006
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
aduh95 mentioned this pull request Oct 9, 2024
nodejs-github-bot pushed a commit that referenced this pull request Jan 6, 2025
Refs: #55006
Refs: #54807 (comment)
PR-URL: #56470
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. test_runner Issues and PRs related to the test runner subsystem. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL