Skip to content

fix(NODE-4834): ensure that MessageStream is destroyed when connections are destroyed #3482

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

Merged
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4130597
fix(NODE-4834): Add calls to destroy kMessageStream
W-A-James Dec 5, 2022
4c10235
test(NODE-4834): WIP - Start work on unit tests
W-A-James Dec 5, 2022
b341938
fix(NODE-4834): Add guards to onError, onClose, onTimeout
W-A-James Dec 6, 2022
032de2d
test(NODE-4834): WIP progress on unit tests
W-A-James Dec 6, 2022
f75e202
style(NODE-4834): Revert style changes
W-A-James Dec 6, 2022
586c410
test(NODE-4834): Remove unit test 'only' annotations
W-A-James Dec 6, 2022
7a8d807
test(NODE-4834): move test to more appropriate position
W-A-James Dec 6, 2022
0c804a6
style(NODE-4834): Remove todo comment
W-A-James Dec 6, 2022
4e5a9bb
docs(NODE-4834): Add tsdoc comments for clarification on closed and d…
W-A-James Dec 6, 2022
5ccb807
style(NODE-4834): Eslint fixes
W-A-James Dec 6, 2022
770d050
test(NODE-4834): Change test descriptions to match testing standards …
W-A-James Dec 7, 2022
92d577d
docs(NODE-4834): Update inline documentation to reference state rathe…
W-A-James Dec 7, 2022
1ada8ca
fix(NODE-4834): Address review comments
W-A-James Dec 8, 2022
21dc8b4
test(NODE-4834): FakeSocket now simulates IO delay
W-A-James Dec 8, 2022
f5f12f5
style(NODE-4834): Revert unintended style change
W-A-James Dec 8, 2022
1e5d874
test(NODE-4834): Ensure that FakeSocket.end also sets this.writableEn…
W-A-James Dec 8, 2022
f940281
fix(NODE-4834): Update Connection.destroy and event handler logic to …
W-A-James Dec 12, 2022
927b883
test(NODE-4834): Add unit tests to check that options are treated cor…
W-A-James Dec 12, 2022
bf1c8f0
fix(NODE-4834): Address eslint fixes
W-A-James Dec 12, 2022
452c1f0
docs(NODE-4834): Remove irrelevant docs
W-A-James Dec 12, 2022
dcda86c
style(NODE-4834): eslint fixes
W-A-James Dec 12, 2022
c74bff8
refactor(NODE-4834): Make all paths through Connection.destroy async
W-A-James Dec 12, 2022
7993c4e
fix(NODE-4834): Address review comments
W-A-James Dec 12, 2022
e5c8e0a
test(NODE-4834): Update old test
W-A-James Dec 12, 2022
6540197
test(NODE-4834): remove 'only' annotation
W-A-James Dec 12, 2022
7d43afb
test(NODE-4834): Fix failing tests
W-A-James Dec 13, 2022
2cdcc21
test(NODE-4834): remove debug messages
W-A-James Dec 13, 2022
8d66f61
fix: only invoke callback when it is defined
nbbeeken Dec 13, 2022
44d5b05
fix: lint
nbbeeken Dec 13, 2022
860d741
rm: prints
nbbeeken Dec 13, 2022
3b59a12
test(NODE-4834): Update tests to be more coherent
W-A-James Dec 15, 2022
50fc706
test(NODE-4834): Reorganize tests
W-A-James Dec 15, 2022
a11a4f6
test(NODE-4834): remove to.not.have.been.calledOnce instances
W-A-James Dec 15, 2022
23755ca
test(NODE-4834): Separate tests more cleanly
W-A-James Dec 16, 2022
878c764
test(NODE-4834): Split up tests more cleanly
W-A-James Dec 16, 2022
995700b
test(NODE-4834): fix test name typo
W-A-James Dec 16, 2022
c0d0189
Merge branch 'main' into NODE-4834/destroy_message_stream_when_connec…
nbbeeken Dec 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(NODE-4834): remove debug messages
  • Loading branch information
W-A-James committed Dec 13, 2022
commit 2cdcc21e3aab4b86215e77a52eba1d67c7415e89
3 changes: 3 additions & 0 deletions test/integration/node-specific/topology.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ describe('Topology', function () {
it('should correctly track states of a topology', {
metadata: { requires: { apiVersion: false, topology: '!load-balanced' } }, // apiVersion not supported by newTopology()
test: function (done) {
debugger;
const topology = this.configuration.newTopology();

const states = [];
Expand All @@ -15,7 +16,9 @@ describe('Topology', function () {
} catch (error) {
done(error);
}
console.log('before close');
topology.close({}, err => {
console.log('In close');
try {
expect(err).to.not.exist;
expect(topology.isDestroyed()).to.be.true;
Expand Down