René's URL Explorer Experiment


Title: test-runner: fix potential memory leaks by abhishekSavani · Pull Request #60860 · nodejs/node · GitHub

Open Graph Title: test-runner: fix potential memory leaks by abhishekSavani · Pull Request #60860 · nodejs/node

X Title: test-runner: fix potential memory leaks by abhishekSavani · Pull Request #60860 · nodejs/node

Description: This pull request focuses on fixing resource leaks in the test runner, specifically targeting memory leaks caused by unclosed readline interfaces and unreleased event listeners in watch mode. It also introduces new tests to verify that these leaks are resolved and that resources are properly cleaned up across various test scenarios. Resource management improvements: Explicitly close the readline interface in runTestFile to prevent memory leaks after test execution. Refactor the file watcher in watchFiles to use a named event handler and add a cleanup function that removes the 'changed' event listener, ensuring listeners do not accumulate and are properly released. [1] [2] ✅ Prevent memory leaks in test runner process isolation mode ✅ Prevent listener accumulation in watch mode ✅ Improve long-running test suite stability ✅ Reduce memory consumption in CI/CD environments Why this matters: ISSUE 1 Without fix: readline.Interface stays open when child writes to stderr -> process might hang indefinitely With fix: rl.close() is called -> process exits cleanly Test catches regression: If someone removes rl.close(), test will timeout and fail ISSUE 2 Without fix: Anonymous listener can't be removed -> watch mode might not exit cleanly on SIGTERM With fix: Named function with cleanup -> proper shutdown Test catches regression: If cleanup is removed, watch mode won't exit on SIGTERM, test will timeout

Open Graph Description: This pull request focuses on fixing resource leaks in the test runner, specifically targeting memory leaks caused by unclosed readline interfaces and unreleased event listeners in watch mode. It al...

X Description: This pull request focuses on fixing resource leaks in the test runner, specifically targeting memory leaks caused by unclosed readline interfaces and unreleased event listeners in watch mode. It al...

Opengraph URL: https://github.com/nodejs/node/pull/60860

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:382f1683-1925-aa40-0f3d-fb8df8b02277
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idACD4:104714:25B990:361883:6A4CCDFB
html-safe-noncef6fd687a3e0037d0cce78205de1ae0875c8cd206eea26cd87b767cf34fcfa236
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0Q0OjEwNDcxNDoyNUI5OTA6MzYxODgzOjZBNENDREZCIiwidmlzaXRvcl9pZCI6IjIxOTAyOTczNjk4NDg2MzA3NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfb20b98f6497b8de993a18f47c39ca1d29a76c044f04e2cbfdd9fb1a49cd539e
hovercard-subject-tagpull_request:3047221847
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/pull/60860/files
twitter:imagehttps://avatars.githubusercontent.com/u/55618348?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/55618348?s=400&v=4
og:image:altThis pull request focuses on fixing resource leaks in the test runner, specifically targeting memory leaks caused by unclosed readline interfaces and unreleased event listeners in watch mode. It al...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneee8a9d18044a05fe2d57b9ae797da38c8be34effb03f015f7c42e94770d28a1b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef84814acc6f036583fd43463f5847a846243d2a4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/pull/60860/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F60860%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F60860%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/pull/60860/files
Reloadhttps://github.com/nodejs/node/pull/60860/files
Reloadhttps://github.com/nodejs/node/pull/60860/files
Please reload this pagehttps://github.com/nodejs/node/pull/60860/files
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/pull/60860/files
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 962 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
abhishekSavanihttps://github.com/abhishekSavani
nodejs:mainhttps://github.com/nodejs/node/tree/main
abhishekSavani:abhishekSavani--fix-memory-leaks-in-test-runnerhttps://github.com/abhishekSavani/node/tree/abhishekSavani--fix-memory-leaks-in-test-runner
Conversation 18 https://github.com/nodejs/node/pull/60860
Commits 3 https://github.com/nodejs/node/pull/60860/commits
Checks 48 https://github.com/nodejs/node/pull/60860/checks
Files changed https://github.com/nodejs/node/pull/60860/files
Please reload this pagehttps://github.com/nodejs/node/pull/60860/files
test-runner: fix potential memory leaks https://github.com/nodejs/node/pull/60860/files#top
Show all changes 3 commits https://github.com/nodejs/node/pull/60860/files
6d5c9d1 test_runner: fix memory leaks in runner abhishekSavani Nov 27, 2025 https://github.com/nodejs/node/pull/60860/commits/6d5c9d19d00a2d7011304bb1574964506f447ce6
554a1dc test: add regression tests for memory leaks in test runner abhishekSavani Nov 27, 2025 https://github.com/nodejs/node/pull/60860/commits/554a1dc505be8a1f52132cff4deaa9f427c31480
4705e2c test: remove deprecated memory leak regression test for test runner abhishekSavani Nov 27, 2025 https://github.com/nodejs/node/pull/60860/commits/4705e2c37f7e42c39bec5ba20c315590f4b5a1f4
Clear filters https://github.com/nodejs/node/pull/60860/files
Please reload this pagehttps://github.com/nodejs/node/pull/60860/files
Please reload this pagehttps://github.com/nodejs/node/pull/60860/files
lib/internal/test_runner/runner.jshttps://github.com/nodejs/node/pull/60860/files#diff-840cee72cdda14be90e6c5607ffa844eaf73be966607ddc834cc667bd142fb21
View file https://github.com/abhishekSavani/node/blob/4705e2c37f7e42c39bec5ba20c315590f4b5a1f4/lib/internal/test_runner/runner.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/60860/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/60860/files#diff-840cee72cdda14be90e6c5607ffa844eaf73be966607ddc834cc667bd142fb21
https://github.com/nodejs/node/pull/60860/files#diff-840cee72cdda14be90e6c5607ffa844eaf73be966607ddc834cc667bd142fb21
https://github.com/nodejs/node/pull/60860/files#diff-840cee72cdda14be90e6c5607ffa844eaf73be966607ddc834cc667bd142fb21
https://github.com/nodejs/node/pull/60860/files#diff-840cee72cdda14be90e6c5607ffa844eaf73be966607ddc834cc667bd142fb21
https://github.com/nodejs/node/pull/60860/files#diff-840cee72cdda14be90e6c5607ffa844eaf73be966607ddc834cc667bd142fb21
https://github.com/nodejs/node/pull/60860/files#diff-840cee72cdda14be90e6c5607ffa844eaf73be966607ddc834cc667bd142fb21
Please reload this pagehttps://github.com/nodejs/node/pull/60860/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.