| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Tim Perry <pimterry@gmail.com>
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #64372 +/- ##
==========================================
- Coverage 90.25% 90.25% -0.01%
==========================================
Files 741 741
Lines 241165 241192 +27
Branches 45428 45435 +7
==========================================
+ Hits 217667 217678 +11
- Misses 15069 15085 +16
Partials 8429 8429 see 39 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Signed-off-by: Tim Perry <pimterry@gmail.com> PR-URL: #64372 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Signed-off-by: Tim Perry <pimterry@gmail.com> PR-URL: #64372 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Signed-off-by: Tim Perry <pimterry@gmail.com> PR-URL: #64372 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Signed-off-by: Tim Perry <pimterry@gmail.com> PR-URL: #64372 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
| Back | FazBrowse Home | New Git URL |
This fixes the flaky test recently introduced in #63690.
I have seen #64084 which tried to fix this as well but was closed as it didn't reproduce under stress test on main, so it couldn't be verified.
I think that that PR's diagnosis is correct (writing in the watched folder causes the flake). This PR takes a slightly different approach: removing the 'marker' file write entirely, to verify on executed test names instead (dropping any possibility of races via IO or watch behaviour, by doing zero writes during the test).
I'm pretty sure I know the exact failure scenario:
As noted there, this is hard to verify as flaky in the CI job, but it is verifiable with a manual delay:
}).on('data', function({ type }) { if (type === 'test:watch:drained') { setTimeout(() => { // <-- inject delay here stream.removeAllListeners('test:fail'); stream.removeAllListeners('test:pass'); controller.abort(); }, 250); } });Dropping the IO solves this, since it guarantees no watch events will fire, and removes the race entirely. With this fix in place, it now passes 100% for me with the same or larger setTimeout delays added manually.
As a more general "prove a flake fix" argument, where it's difficult to repro, personally I think "repro with a manual delay in an unpredictable-duration step" is a reasonable demo, even if the stress test passes.