-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(NODE-4262): make startSession work without a connection #3286
Conversation
08d6b88
to
b32a9d2
Compare
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.
I think I commented all the places I found - but there are a number of tests that are refactored seemingly at random while other tests in the file are not, and a number of tests that are deleted.
Non-test changes look good to me - just some small questions and suggestions 😄
|
||
test: async function () { | ||
const session = client.startSession({ causalConsistency: true }); | ||
collection.insertOne({ darmok: 'jalad' }, { session }); |
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.
unrelated to your work but we should await these functions - especially since they're examples!!
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.
I'm not so sure, we should look closer at this test, currently it will always pass
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.
This is in the examples folder, so I assumed it's an example that the docs team pulls in?
d820581
to
9f011bc
Compare
Test changes summary:
|
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.
Assuming CI passes (it did last time), LGTM
Description
What is changing?
What is the motivation for this change?
Now that connect is automatic and since server sessions are created lazily we can allow the API to make sessions before the client has been connected.
Double check the following
npm run check:lint
script<type>(NODE-xxxx)<!>: <description>