-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
test: deflake stream-readable-to-web test #58948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
test: deflake stream-readable-to-web test #58948
Conversation
cc @nodejs/streams |
Failed to start CI⚠ No approving reviews found ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/16055944616 |
I guess I appreciate the CI not running without a review lol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58948 +/- ##
==========================================
- Coverage 90.08% 90.06% -0.02%
==========================================
Files 641 641
Lines 188718 188718
Branches 37022 37025 +3
==========================================
- Hits 170000 169965 -35
- Misses 11417 11462 +45
+ Partials 7301 7291 -10 🚀 New features to boost your workflow:
|
I think somethings wrong with how I'm checking for crypto support Will fix |
@Ethan-Arrowood The problem is that all static |
I had a feeling that was it. Doesn't seem like we have any other occurrences of this in our tests. I could switch back to CJS if that is preferred, or I think a dynamic import is okay? |
Going back to cjs would make the diff useful. It currently looks like a new test. |
My preference is to move towards using ESM but if anyone else feels strongly it should stay as CJS I will happily switch back. Just let me know if that is what is wanted |
|
checkMemoryUsage(); | ||
// eslint-disable-next-line no-unused-vars | ||
for await (const _ of randomWebStream) { | ||
// Yield event loop to allow garbage collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, this behavior likely relies on the bug described in #54918 - the event loop is not supposed to block on just any garbage collection, which can cause a deadlock, and in the future it might go away (if someone manages to eradicate the deadlock by rewriting the task runner).
Alternatively if there's a specific leaky object with a known class that this tries to test, checkIfCollectableByCounting()
from test/common/gc.js
might be less flaky. Though I can't really tell whether that's applicable from a look of this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know. I agree that issue seems related here; particularly with the previous heavy use of timers. I believe that the Readable / GC is doing what they are supposed to regarding memory management.
f728218
to
4cd524b
Compare
Please rereview when you get a chance; I rebased on main so that CI might play nicer. I was only hitting other flaky test haha |
Co-authored-by: Luigi Pinca <[email protected]>
4cd524b
to
5b5f9dc
Compare
Commit Queue failed- Loading data for nodejs/node/pull/58948 ✔ Done loading data for nodejs/node/pull/58948 ----------------------------------- PR info ------------------------------------ Title test: deflake stream-readable-to-web test (#58948) Author Ethan Arrowood <[email protected]> (@Ethan-Arrowood) Branch Ethan-Arrowood:deflake-stream-readable-to-web -> nodejs:main Labels test, flaky-test, needs-ci Commits 3 - test: deflake stream-readable-to-web test - test: dynamic import cypto - test: simplify but keep accurate Committers 1 - Ethan Arrowood <[email protected]> PR-URL: https://github.com/nodejs/node/pull/58948 Fixes: https://github.com/nodejs/node/issues/58949 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Mattias Buelens <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/58948 Fixes: https://github.com/nodejs/node/issues/58949 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Mattias Buelens <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 03 Jul 2025 16:29:25 GMT ✔ Approvals: 5 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/58948#pullrequestreview-2983898238 ✔ - Mattias Buelens (@MattiasBuelens): https://github.com/nodejs/node/pull/58948#pullrequestreview-2983969659 ✔ - Juan José Arboleda (@juanarbol): https://github.com/nodejs/node/pull/58948#pullrequestreview-2984451374 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/58948#pullrequestreview-2985657415 ✔ - Zeyu "Alex" Yang (@himself65): https://github.com/nodejs/node/pull/58948#pullrequestreview-2989658746 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2025-07-08T19:35:38Z: https://ci.nodejs.org/job/node-test-pull-request/67889/ - Querying data for job/node-test-pull-request/67889/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/16181664591 |
Commit Queue failed- Loading data for nodejs/node/pull/58948 ✔ Done loading data for nodejs/node/pull/58948 ----------------------------------- PR info ------------------------------------ Title test: deflake stream-readable-to-web test (#58948) Author Ethan Arrowood <[email protected]> (@Ethan-Arrowood) Branch Ethan-Arrowood:deflake-stream-readable-to-web -> nodejs:main Labels test, flaky-test, needs-ci Commits 3 - test: deflake stream-readable-to-web test - test: dynamic import cypto - test: simplify but keep accurate Committers 1 - Ethan Arrowood <[email protected]> PR-URL: https://github.com/nodejs/node/pull/58948 Fixes: https://github.com/nodejs/node/issues/58949 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Mattias Buelens <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/58948 Fixes: https://github.com/nodejs/node/issues/58949 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Mattias Buelens <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 03 Jul 2025 16:29:25 GMT ✔ Approvals: 5 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/58948#pullrequestreview-2983898238 ✔ - Mattias Buelens (@MattiasBuelens): https://github.com/nodejs/node/pull/58948#pullrequestreview-2983969659 ✔ - Juan José Arboleda (@juanarbol): https://github.com/nodejs/node/pull/58948#pullrequestreview-2984451374 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/58948#pullrequestreview-2985657415 ✔ - Zeyu "Alex" Yang (@himself65): https://github.com/nodejs/node/pull/58948#pullrequestreview-2989658746 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-07-09T22:57:46Z: https://ci.nodejs.org/job/node-test-pull-request/67916/ - Querying data for job/node-test-pull-request/67916/ ✔ 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 58948 From https://github.com/nodejs/node * branch refs/pull/58948/merge -> FETCH_HEAD ✔ Fetched commits as c44fa8d0b65d..5b5f9dc85b63 -------------------------------------------------------------------------------- [main f797193ad8] test: deflake stream-readable-to-web test Author: Ethan Arrowood <[email protected]> Date: Thu Jul 3 10:27:03 2025 -0600 2 files changed, 69 insertions(+), 62 deletions(-) delete mode 100644 test/parallel/test-stream-readable-to-web.js create mode 100644 test/parallel/test-stream-readable-to-web.mjs [main 1eca5dbc83] test: dynamic import cypto Author: Ethan Arrowood <[email protected]> Date: Thu Jul 3 13:30:28 2025 -0600 1 file changed, 54 insertions(+), 48 deletions(-) [main 15def1f185] test: simplify but keep accurate Author: Ethan Arrowood <[email protected]> Date: Thu Jul 3 15:43:55 2025 -0600 1 file changed, 36 insertions(+), 47 deletions(-) ✔ Patches applied There are 3 commits in the PR. Attempting autorebase. Rebasing (2/6) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- test: deflake stream-readable-to-web testhttps://github.com/nodejs/node/actions/runs/16201169771 |
Fixes: #58949