-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: fix writefile with fd #38820
test: fix writefile with fd #38820
Conversation
fix writefile with fd so that it'll close the fds that is uses during the 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.
Would it be more "correct" to wrap the expected-to-fail writeFile()
calls in a try-finally block and close the fd in the finally block?
What I did was definitely wrong for the sync write, as if one of those asserts fails I would miss registering the beforeExit. For the other paths - I think that its simpler to push the fds into an array, because everything is async and I would need to make sure that all of the paths are covered. |
3e3264c
to
280e745
Compare
Fast-track has been requested by @targos. Please 👍 to approve. |
fix writefile with fd so that it'll close the fds that is uses during the test. PR-URL: #38820 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
Landed in 0222a10 |
fix writefile with fd so that it'll close the fds that is uses during the test. PR-URL: #38820 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
fix writefile with fd so that it'll close the fds that is uses during the test. PR-URL: #38820 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
fix writefile with fd so that it'll close the fds that is uses during the test. PR-URL: #38820 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
fix writefile with fd so that it'll close the fds that is uses during the test. PR-URL: #38820 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
fix writefile with fd so that it'll close the fds that is uses during the test. PR-URL: nodejs#38820 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
Fix writefile with fd so that it'll close the fds that it uses during the test, as it breaks the build on Windows, after #38684