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

DRIVERS-1872 Add sessions spec tests to verify explicit sessions were created on the correct client #1754

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

qingyang-hu
Copy link
Contributor

DRIVERS-1872

Please complete the following before merging:

  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded
    clusters, and serverless).

client: *client1

tests:
- description: Session argument is for the right client (insertOne)
Copy link
Member

Choose a reason for hiding this comment

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

It's expensive to setup and teardown each of these tests. Could we combine all of these tests into one to avoid that problem?

@qingyang-hu qingyang-hu marked this pull request as ready for review February 20, 2025 22:13
@qingyang-hu qingyang-hu requested a review from a team as a code owner February 20, 2025 22:13
@qingyang-hu qingyang-hu requested review from dariakp and sanych-sun and removed request for a team February 20, 2025 22:13
@dariakp dariakp requested review from a team and removed request for dariakp February 21, 2025 13:20
models: []
session: *session1
expectError:
isClientError: true
Copy link
Member

Choose a reason for hiding this comment

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

Where from we get the list of operations? Should we also test the following commands (I've reviewed C# Driver public API that accepts session as a parameter)?

  • MongoClient.DropDatabase
  • MongoClient.ListDatabaseNames
  • MongoClient.Watch
  • MongoDatabase.CreateCollection
  • MongoDatabase.CreateView
  • MongoDatabase.RenameCollection
  • MongoDatabase.RunCommand
  • MongoDatabase.Watch
  • Collection.AggregateToCollection
  • Collection.Watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants