| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
| await new Promise((resolve) => setTimeout(() => { | ||
| unlinkSync(fileToDeletePathLocal); | ||
| resolve(); | ||
| }, common.platformTimeout(1000))); |
There was a problem hiding this comment.
Can/Should this be simplified with node:timers/promises?
Sorry, something went wrong.
There was a problem hiding this comment.
I didn't think about it, thanks for the suggestion, I'll take a look 😁
Sorry, something went wrong.
There was a problem hiding this comment.
Would using node:fs/promises be enough here? It seems weird to have to put a sync operation in an async one
Sorry, something went wrong.
There was a problem hiding this comment.
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 😁
Sorry, something went wrong.
There was a problem hiding this comment.
just update 😁
Sorry, something went wrong.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 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 |
Sorry, something went wrong.
Sorry, something went wrong.
| function wait(ms) { | ||
| return new Promise((resolve) => setTimeout(resolve, ms)); | ||
| } |
There was a problem hiding this comment.
You can use setTimeout() from node:timers/promises for this exact functionality.
Sorry, something went wrong.
There was a problem hiding this comment.
done 😁
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, thanks!
Sorry, something went wrong.
|
I see this test fail a lot on windows platform, could we queue a stress test? |
Sorry, something went wrong.
|
Stress test CI: https://ci.nodejs.org/view/Stress/job/node-stress-single-test/538/ 🟢 |
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
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>
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>
| Back | FazBrowse Home | New Git URL |
This PR should address #54807.
I'm leaving this in Draft while testing more extensively 🚀