Skip to content
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

NODE-2355: Allow GridFS write stream to destroy #2702

Merged
merged 1 commit into from Jan 20, 2021

Conversation

durran
Copy link
Member

@durran durran commented Jan 15, 2021

Description

The GridFSBucketWriteStream needs to invoke the Writable constructor, not just inherit from it, in order to properly initialise the internal state of the stream. This allows the stream to be destroyed properly.

@durran durran force-pushed the NODE-2355/gridfs-write-streams branch from f7f7abe to 594ef3b Compare January 15, 2021 16:29
@durran durran force-pushed the NODE-2355/gridfs-write-streams branch from 594ef3b to eb8e8ac Compare January 15, 2021 17:00
Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, mod one nit: this test is written in the "old" style; we've been trying write new tests using const/let instead of var, and chai expect rather than the old test.equal/test.ok style of assertions.

@durran
Copy link
Member Author

durran commented Jan 18, 2021

@emadum Sorry about that - I was just being consistent with the tests currently in that file. Would you be ok with leaving this PR as is (so it's just the relevant changes) and opening a new PR that refactors all the tests in that file to the new style? That way this PR doesn't get cluttered with refactorings.

@emadum
Copy link
Contributor

emadum commented Jan 19, 2021

@emadum Sorry about that - I was just being consistent with the tests currently in that file. Would you be ok with leaving this PR as is (so it's just the relevant changes) and opening a new PR that refactors all the tests in that file to the new style? That way this PR doesn't get cluttered with refactorings.

SGTM! 👍

@emadum emadum self-requested a review January 19, 2021 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants